-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
72 lines (61 loc) · 2.19 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
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
scalaVersion in ThisBuild := "2.11.8"
organization in ThisBuild := "inoio"
SbtScalariform.scalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignParameters, true)
.setPreference(AlignArguments, true)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true)
.setPreference(AlignSingleLineCaseStatements.MaxArrowIndent, 60)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(IndentLocalDefs, true)
.setPreference(IndentSpaces, 2)
.setPreference(DanglingCloseParenthesis, Prevent)
lazy val commonSettings = Seq(
name := "simplez",
organization := "inoio",
version := "1.0.0-SNAPSHOT",
scalacOptions ++= Seq(
"-feature",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps",
"-deprecation"
),
scalaVersion := "2.11.7",
autoCompilerPlugins := true,
resolvers += "bintray/non" at "http://dl.bintray.com/non/maven",
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.7.1")
) ++ scalariformSettings
lazy val main = project.in(file("main"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
"org.specs2" %% "specs2" % "2.4" % "test"
),
testOptions in Test += Tests.Argument("console", "markdown"),
sourceGenerators in Compile += Def.task {
val result : Seq[(String, String)] = SimplezGenerator.makeSomeSources()
result.map{case (name, content) =>
val file = (sourceManaged in Compile).value / "simplez" / name
IO.write(file, content)
file
}
}.taskValue
)
lazy val exampleDependencies = Seq(
"com.typesafe.play" % "play-json_2.11" % "2.4.0-M1",
"org.typelevel" %% "shapeless-scalaz" % "0.3",
"org.specs2" %% "specs2" % "2.4" % "test"
)
lazy val examples = project.in(file("examples"))
.dependsOn(main)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= exampleDependencies
)
.settings(name := "simplez-examplez")