forked from scalacenter/sbt-scalafix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
74 lines (64 loc) · 1.95 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
inThisBuild(
List(
Test / parallelExecution := false,
scalafixDependencies := List(
// Custom rule published to Maven Central https://github.com/scalacenter/example-scalafix-rule
"ch.epfl.scala" %% "example-scalafix-rule" % "1.4.0"
)
)
)
onLoadMessage := s"Welcome to sbt-scalafix ${version.value}"
moduleName := "sbt-scalafix"
// Publish settings
organization := "ch.epfl.scala"
homepage := Some(url("https://github.com/scalacenter/sbt-scalafix"))
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
)
developers := List(
Developer(
"bjaglin",
"Brice Jaglin",
url("https://github.com/bjaglin")
),
Developer(
"olafurpg",
"Ólafur Páll Geirsson",
url("https://geirsson.com")
)
)
commands += Command.command("ci-windows") { s =>
"testOnly -- -l SkipWindows" ::
"scripted sbt-*/*" ::
s
}
// Dependencies
resolvers += Resolver.sonatypeRepo("public")
libraryDependencies ++= Dependencies.all
libraryDependencies ++= List(
"com.lihaoyi" %% "fansi" % "0.3.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.10" % Test
)
scalaVersion := "2.12.15"
// keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049
pluginCrossBuild / sbtVersion := "1.2.1"
// first release that can build 2.13 (as it bring a Zinc version with a compiler-bridge published for 2.13)
scriptedSbt := "1.2.7"
libraryDependencies += compilerPlugin(scalafixSemanticdb)
scalacOptions ++= List("-Ywarn-unused", "-Yrangepos")
scalacOptions ++= List(
"-target:jvm-1.8",
"-Xfatal-warnings",
"-Xlint"
)
// Scripted
enablePlugins(ScriptedPlugin)
sbtPlugin := true
scriptedBufferLog := false
scriptedLaunchOpts ++= Seq(
"-Xmx2048M",
s"-Dplugin.version=${version.value}",
"-Dsbt-scalafix.uselastmodified=true" // the caching scripted relies on sbt-scalafix only checking file attributes, not content
)