-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
102 lines (95 loc) · 3.22 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// *****************************************************************************
// Projects
// *****************************************************************************
lazy val scalaIntro =
project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin)
.settings(settings)
.settings(
libraryDependencies ++= Seq(
library.catsCore,
library.catsEffect,
library.refined,
library.refinedCats,
library.scalaCheck % Test,
library.scalaTest % Test,
)
)
// *****************************************************************************
// Library dependencies
// *****************************************************************************
lazy val library =
new {
object Version {
val cats = "1.6.0"
val catsEffect = "1.3.0"
val refined = "0.9.5"
val scalaCheck = "1.14.0"
val scalaTest = "3.0.7"
}
val catsCore = "org.typelevel" %% "cats-core" % Version.cats
val catsEffect = "org.typelevel" %% "cats-effect" % Version.catsEffect
val refined = "eu.timepit" %% "refined" % Version.refined
val refinedCats = "eu.timepit" %% "refined-cats" % Version.refined
val scalaCheck = "org.scalacheck" %% "scalacheck" % Version.scalaCheck
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
}
// *****************************************************************************
// Settings
// *****************************************************************************
lazy val settings =
commonSettings ++
scalafmtSettings
lazy val commonSettings =
Seq(
scalaVersion := "2.12.8",
organization := "com.wegtam",
organizationName := "Wegtam GmbH",
startYear := Some(2019),
licenses += ("AGPL-3.0", url("https://www.gnu.org/licenses/agpl.html")),
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-explaintypes",
"-feature",
"-language:higherKinds",
"-target:jvm-1.8",
"-unchecked",
"-Xcheckinit",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint:adapted-args",
"-Xlint:by-name-right-associative",
"-Xlint:constant",
"-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",
"-Ydelambdafy:method",
"-Yno-adapted-args",
"-Ypartial-unification",
"-Ywarn-numeric-widen",
"-Ywarn-unused-import",
"-Ywarn-value-discard"
),
Compile / console / scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused-import"),
Compile / unmanagedSourceDirectories := Seq((Compile / scalaSource).value),
Compile / compile / wartremoverWarnings ++= Warts.unsafe,
Test / console / scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused-import"),
Test / unmanagedSourceDirectories := Seq((Test / scalaSource).value)
)
lazy val scalafmtSettings =
Seq(
scalafmtOnCompile := true,
)