-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
60 lines (56 loc) · 1.53 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
import Dependencies._
inThisBuild(
List(
organization := "com.github.poslegm",
homepage := Some(url("https://github.com/poslegm/brief/")),
licenses := List("MIT" -> url("http://opensource.org/licenses/MIT")),
developers := List(
Developer(
"poslegm",
"Mikhail Chugunkov",
"poslegm@gmail.com",
url("https://github.com/poslegm")
)
)
)
)
def scala212 = "2.12.16"
def scala213 = "2.13.8"
commands += Command.command("ci-test") { s =>
val scalaVersion = sys.env.get("TEST") match {
case Some("2.12") => scala212
case _ => scala213
}
s"++$scalaVersion" ::
"test" ::
"publishLocal" ::
s
}
lazy val root = project
.in(file("."))
.settings(
name := "brief",
libraryDependencies ++= Seq(refined, munit, circeDerivation),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq.empty
case _ => Seq(macroParadise)
}
},
testFrameworks += new TestFramework("munit.Framework"),
scalaVersion := scala213,
crossScalaVersions := List(scala213, scala212),
scalacOptions ++= Seq(
// "-Ymacro-debug-lite",
"-deprecation",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen"
),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq("-Ymacro-annotations")
case _ => Seq.empty
}
}
)