-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
64 lines (60 loc) · 2.08 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
val zioVersion = "2.0.0"
val akkaVersion = "2.6.19"
val akkaHttpVersion = "10.2.9"
inThisBuild(List(
organization := "io.scalac",
homepage := Some(url("https://github.com/ScalaConsultants/zio-akka-http-interop")),
licenses := List("MIT" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
id = "jczuchnowski",
name = "Jakub Czuchnowski",
email = "[email protected]",
url = url("https://github.com/jczuchnowski")
)
)
))
val compilerOptions = Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture",
"-Xfatal-warnings",
"-Ywarn-unused-import"
)
val root = (project in file("."))
.settings(
name := "zio-akka-http-interop",
scalaVersion := "2.13.8",
crossScalaVersions := Seq("2.12.16", "2.13.8"),
scalacOptions ++= {
if (priorTo2_13(scalaVersion.value)) compilerOptions
else
compilerOptions.flatMap {
case "-Ywarn-unused-import" => Seq("-Ywarn-unused:imports")
case "-Xfuture" => Nil
case other => Seq(other)
}
},
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")),
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion % Provided,
"com.typesafe.akka" %% "akka-stream" % akkaVersion % Provided,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion % Provided,
"dev.zio" %% "zio" % zioVersion % Provided,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test
)
)
def priorTo2_13(scalaVersion: String): Boolean =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, minor)) if minor < 13 => true
case _ => false
}