-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
80 lines (72 loc) · 2.37 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
// *****************************************************************************
// Projects
// *****************************************************************************
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.4")
lazy val `free-tagless-eff` =
project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin, GitVersioning, GitBranchPrompt)
.settings(settings)
.settings(
libraryDependencies ++= Seq(
library.cats("-core"),
library.cats("-free"),
library.cats("-kernel"),
library.cats("-macros"),
library.eff,
library.scalaCheck % Test,
library.scalaTest % Test
)
)
// *****************************************************************************
// Library dependencies
// *****************************************************************************
lazy val library =
new {
object Version {
val scalaCheck = "1.13.5"
val scalaTest = "3.0.4"
val cats = "1.0.0-MF"
val eff = "4.5.0"
}
val scalaCheck = "org.scalacheck" %% "scalacheck" % Version.scalaCheck
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
def cats(stuff: String) = "org.typelevel" %% s"cats$stuff" % Version.cats
val eff = "org.atnos" %% "eff" % Version.eff
}
// *****************************************************************************
// Settings
// *****************************************************************************
lazy val settings =
commonSettings ++
gitSettings ++
scalafmtSettings
lazy val commonSettings =
Seq(
scalaVersion := "2.12.3",
organization := "com.aracon",
organizationName := "Pere Villega",
startYear := Some(2017),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-target:jvm-1.8",
"-encoding", "UTF-8",
"-Ypartial-unification"
),
unmanagedSourceDirectories.in(Compile) := Seq(scalaSource.in(Compile).value),
unmanagedSourceDirectories.in(Test) := Seq(scalaSource.in(Test).value),
wartremoverWarnings in (Compile, compile) ++= Warts.unsafe
)
lazy val gitSettings =
Seq(
git.useGitDescribe := true
)
lazy val scalafmtSettings =
Seq(
scalafmtOnCompile := true,
scalafmtOnCompile.in(Sbt) := false,
scalafmtVersion := "1.3.0"
)