-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
80 lines (70 loc) · 2.43 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
lazy val root = (project in file("."))
.settings(
commonSettings,
compilerPlugins,
compilerOptions,
dependencies,
testSettings,
)
lazy val commonSettings = Seq(
organization := "com.ocado.gm.wms",
name := "tagless-logging",
scalaVersion := "2.12.4",
// due to a bug in sbt 1.0.x - should be removed when using 0.13.x
updateOptions := updateOptions.value.withGigahorse(false),
)
val compilerPlugins = Seq(
addCompilerPlugin("io.tryp" % "splain" % "0.3.1" cross CrossVersion.patch),
addCompilerPlugin("com.softwaremill.clippy" %% "plugin" % "0.5.3" classifier "bundle"),
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.7"),
addCompilerPlugin(("org.scalameta" % "paradise" % "3.0.0-M11").cross(CrossVersion.full)),
)
lazy val compilerOptions =
scalacOptions ++= Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-explaintypes", // Explain type errors in more detail.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
"-Xfatal-warnings", // Fail the compilation if there are any warnings.
"-language:higherKinds",
"-Ypartial-unification",
"-P:splain:all:true",
"-P:clippy:colors=true",
"-language:implicitConversions"
)
lazy val dependencies = {
val cats = Seq(
"org.typelevel" %% "cats-core" % "1.4.0",
"org.typelevel" %% "cats-effect" % "1.0.0",
"org.typelevel" %% "cats-mtl-core" % "0.4.0",
"com.github.mpilquist" %% "simulacrum" % "0.14.0",
"org.typelevel" %% "cats-tagless-macros" % "0.1.0"
)
val config = Seq(
"com.github.pureconfig" %% "pureconfig" % "0.9.1",
)
val logging = Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0"
)
val akkaHttp = Seq(
"com.typesafe.akka" %% "akka-http" % "10.1.1"
)
Seq(
libraryDependencies ++= cats ++ config ++ logging ++ akkaHttp
)
}
lazy val testSettings = {
val dependencies = {
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % "3.0.4",
"org.scalatest" %% "scalatest" % "3.0.5",
"com.ironcorelabs" %% "cats-scalatest" % "2.3.1",
).map(_ % Test)
}
Seq(
logBuffered in Test := false,
dependencies
)
}