forked from scala-text/S99
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
40 lines (34 loc) · 880 Bytes
/
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
name := "S99"
scalaVersion := "2.12.11"
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.1.2" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.3" % "test"
)
val unusedWarnings = Def.setting(
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) =>
List("-Ywarn-unused-import")
case _ =>
List("-Ywarn-unused:imports")
}
)
scalacOptions ++= (
"-deprecation" ::
"-unchecked" ::
"-Xlint" ::
"-language:existentials" ::
"-language:higherKinds" ::
"-language:implicitConversions" ::
Nil
) ::: unusedWarnings.value
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11 | 12)) =>
Seq("-Yno-adapted-args", "-Xfuture")
case _ =>
Nil
}
}
Seq(Compile, Test).flatMap(c =>
scalacOptions in (c, console) --= unusedWarnings.value
)