-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
40 lines (34 loc) · 1.14 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
organization in ThisBuild := "io.estatico"
lazy val coercible = project.in(file("."))
.aggregate(core)
lazy val core = module("core")
lazy val defaultScalacOptions = Seq(
"-Xfatal-warnings",
"-unchecked",
"-feature",
"-deprecation",
"-language:higherKinds",
"-language:implicitConversions"
)
lazy val defaultTestDependencies = Seq(
"org.scalacheck" %% "scalacheck" % "1.13.4",
"org.scalatest" %% "scalatest" % "3.0.0",
"org.scalaz" %% "scalaz-core" % "7.2.15"
).map(_ % "test")
def module(path: String) = {
// Convert path from lisp-case to camelCase
val id = path.split("-").reduce(_ + _.capitalize)
// Convert path from list-case to "space case"
val docName = path.replace('-', ' ')
// Set default and module-specific settings.
applyDefaultSettings(Project(id, file(path))).settings(
name := "Coercible " + docName,
moduleName := "coercible-" + path,
description := "coercible" + docName
)
}
def applyDefaultSettings(project: Project) = project.settings(
scalacOptions ++= defaultScalacOptions,
libraryDependencies ++= defaultTestDependencies,
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.4")
)