-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
38 lines (34 loc) · 1.29 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
val scalatest = "org.scalatest" %% "scalatest" % "3.1.1" % "test"
val junit = "junit" % "junit" % "4.12" % "test"
val scalameterCore = "com.storm-enroute" %% "scalameter-core" % "0.19" % "test"
val scalameter = "com.storm-enroute" %% "scalameter" % "0.19" % "test"
lazy val commonSettings = Seq(
organization := "com.github.guillaumedd",
version := "0.1.3",
scalaVersion := "2.13.1",
crossScalaVersions := Seq("2.11.12", "2.12.11", "2.13.1")
)
lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(
name := "gstlib",
libraryDependencies += scalatest,
libraryDependencies += junit,
libraryDependencies += scalameterCore,
libraryDependencies += scalameter
)
scalacOptions ++= {
Seq("-deprecation", "-Ywarn-unused", "-Ywarn-dead-code") ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 12 => Seq("-opt:l:inline", "-opt-inline-from:**", "-Ywarn-unused:imports")
case _ => Seq("-optimize", "-Ywarn-unused-import")
})
}
unmanagedSourceDirectories in Compile ++= {
(unmanagedSourceDirectories in Compile).value.map { dir =>
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 => file(dir.getPath ++ "-2.13+")
case _ => file(dir.getPath ++ "-2.13-")
}
}
}