-
Notifications
You must be signed in to change notification settings - Fork 286
/
Configuration.scala
38 lines (37 loc) · 1.15 KB
/
Configuration.scala
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
import sbt.{Tests, _}
import Keys.{excludeFilter, exportJars, _}
import org.scalafmt.sbt.ScalafmtPlugin.autoImport._
object Configuration {
val commonSettings = Seq(
organization := "tv.codely",
scalaVersion := "2.12.8",
scalacOptions := {
val default = Seq(
"-Xlint",
"-Xfatal-warnings",
"-unchecked",
"-deprecation",
"-feature",
"-language:higherKinds",
"-Ypartial-unification"
)
if (version.value.endsWith("SNAPSHOT")) {
default :+ "-Xcheckinit"
} else { default } // check against early initialization
},
scalacOptions in (Test, console) --= Seq("-Ywarn-unused:imports", "-Xfatal-warnings"),
scalacOptions in (Test, console) ++= Seq("-Ywarn-unused:-imports"),
javaOptions += "-Duser.timezone=UTC",
fork in Test := false,
parallelExecution in Test := false,
testOptions in Test ++= Seq(
Tests.Argument(TestFrameworks.ScalaTest, "-u", "target/test-reports"),
Tests.Argument("-oDF")
),
cancelable in Global := true,
// Scalafmt
scalafmtConfig := Some(file(".scalafmt.conf")),
// OneJar
exportJars := true
)
}