-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
84 lines (74 loc) · 2.42 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
82
83
84
name := "json-formlets"
organization := "gov.wicourts"
version := "0.9.4"
scalaVersion := "2.12.6"
crossScalaVersions := Seq("2.11.12", "2.12.6")
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.8.0",
"io.argonaut" %% "argonaut" % "6.3.8",
"io.argonaut" %% "argonaut-cats" % "6.3.8",
"org.slf4j" % "slf4j-api" % "1.7.25",
"com.github.julien-truffaut" %% "monocle-core" % "2.0.1"
)
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-matcher-extra" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test",
"org.slf4j" % "slf4j-simple" % "1.7.25" % "test"
)
// https://tpolecat.github.io/2014/04/11/scalac-flags.html
// https://tpolecat.github.io/2017/04/25/scalac-flags.html
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-feature",
"-unchecked",
"-Ypartial-unification",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint:adapted-args",
"-Xlint:by-name-right-associative",
"-Xlint:delayedinit-select",
"-Xlint:doc-detached",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:nullary-override",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Xlint:unsound-match",
// "-Xlint:unused", same as all the -Ywarn-unused:*
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-inaccessible",
"-Ywarn-infer-any",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Yno-predef" // no automatic import of Predef (removes irritating implicits)
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor == 11 =>
Seq("-Ywarn-unused-import")
case Some((2, scalaMajor)) if scalaMajor >= 12 =>
Seq(
"-Xlint:constant",
"-Ywarn-extra-implicit",
"-Ywarn-unused:implicits",
"-Ywarn-unused:imports",
// "-Ywarn-unused:locals", // gives an incorrect warning in Forms.scala
"-Ywarn-unused:params",
"-Ywarn-unused:patvars",
"-Ywarn-unused:privates"
)
case _ =>
Seq.empty
})
//scalacOptions in Test ++= Seq("-Yrangepos")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3")