-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
65 lines (58 loc) · 1.86 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
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
// Cats and cats-free version
val catsVersion = "0.9.0"
// scala-parser-combinator version
val sParSecVersion = "1.0.5"
lazy val commonSettings = Seq(
organization := "nl.soqua",
name := "lcpi",
version := "0.0.1-SNAPSHOT",
scalaVersion := "2.12.1",
test in assembly := {}, // don't run tests on assembly
scalacOptions ++= Seq(
"-feature",
"-Xfatal-warnings",
"-deprecation",
"-unchecked",
"-Ywarn-unused-import"
),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
),
// Exclude the Main.scala from coverage reports
coverageExcludedFiles := ".*Main.*"
)
lazy val ast = (project in file("ast")).
settings(commonSettings: _*).
settings(
name := "ast",
assemblyJarName in assembly := "ast.jar"
)
lazy val parser = (project in file("parser")).
settings(commonSettings: _*).
settings(
name := "parser",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % sParSecVersion
),
assemblyJarName in assembly := "parser.jar"
).dependsOn(ast)
lazy val interpreter = (project in file("interpreter")).
settings(commonSettings: _*).
settings(
name := "interpreter",
assemblyJarName in assembly := "interpreter.jar"
).dependsOn(ast, parser)
lazy val repl = (project in file("repl")).
settings(commonSettings: _*).
settings(
name := "repl",
assemblyJarName in assembly := "repl.jar",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % sParSecVersion,
"org.typelevel" %% "cats" % catsVersion,
"org.typelevel" %% "cats-free" % catsVersion,
"org.jline" % "jline" % "3.1.2"
),
mainClass in assembly := Some("nl.soqua.lcpi.repl.Main")
).dependsOn(ast, parser, interpreter % "test->test;compile->compile")