-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.sbt
81 lines (70 loc) · 2.07 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
75
76
77
78
79
80
81
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",
"bjaglin@teads.tv",
url("https://github.com/bjaglin")
),
Developer(
"olafurpg",
"Ólafur Páll Geirsson",
"olafurpg@gmail.com",
url("https://geirsson.com")
)
)
commands += Command.command("test-skip-windows") { s =>
"testOnly -- -l SkipWindows" ::
s
}
// Dependencies
resolvers ++= Resolver.sonatypeOssRepos("public")
libraryDependencies ++= Dependencies.all
libraryDependencies ++= List(
"com.lihaoyi" %% "fansi" % "0.5.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.19" % Test
)
scalaVersion := "2.12.20"
// keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049
pluginCrossBuild / sbtVersion := "1.4.0"
scriptedSbt := {
val jdk = System.getProperty("java.specification.version").toDouble
if (jdk >= 21)
"1.9.0" // first release that supports JDK21
else
(pluginCrossBuild / sbtVersion).value
}
libraryDependencies += compilerPlugin(scalafixSemanticdb)
scalacOptions ++= List("-Ywarn-unused", "-Yrangepos")
scalacOptions ++= List(
"-target:jvm-1.8",
"-Xfatal-warnings",
"-Xlint"
)
// Scripted
enablePlugins(ScriptedPlugin)
sbtPlugin := true
scriptedBufferLog := false
scriptedBatchExecution := true
scriptedParallelInstances := 2
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
)