-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
103 lines (87 loc) · 3.23 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
/** Settings shared globally. **/
lazy val commonSettings = Seq(
version := "1.0.0-SNAPSHOT",
organization := "org.combinators",
scalaVersion := "2.12.13",
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.typesafeRepo("releases")
),
Compile/scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions",
"-Ypartial-unification",
"-language:higherKinds"
),
Compile/scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions"
),
libraryDependencies ++= Seq(
"org.combinators" %% "jgitserv" % "0.0.1",
"org.scalactic" %% "scalactic" % "3.2.2" % "test",
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
"org.scalameta" %% "scalameta" % "4.4.27",
"org.scalameta" %% "contrib" % "4.1.6",
"org.typelevel" %% "cats-core" % "2.3.1",
"org.typelevel" %% "cats-free" % "2.3.1",
"org.typelevel" %% "cats-effect" % "2.3.1"
),
evictionErrorLevel := Level.Info,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3")
)
/** The core components to model expression problem code generators and domains.
* Things in here are (DI, LI, AI).
*/
lazy val core = (Project(id = "core", base = file("core")))
.settings(commonSettings: _*)
.settings(
moduleName := "expression-problem-core",
//addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
/** Template for a subproject for a specific domain named `domainName`.
* These projects should be (DD, LI, AI).
*/
def standardDomainProject(domainName: String): Project =
(Project(id = s"domain-$domainName", base = file(s"domain/$domainName")))
.settings(commonSettings: _*)
.settings(
moduleName := s"expression-problem-domain-$domainName"
)
.dependsOn(core)
/** The domain of math with arithmetic expressions. **/
lazy val domainMath = standardDomainProject("math")
/** The domain of geometric shapes. **/
lazy val domainShape = standardDomainProject("shape")
/** Template for a subproject for a specific language and its EP approaches.
* Contains code in the set {DD, DI} x LD x {AD, AI}.
*/
def standardLanguageProject(languageName: String): Project =
(Project(id = s"language-$languageName", base = file(s"language/$languageName")))
.settings(commonSettings: _*)
.settings(
moduleName := s"expression-problem-language-$languageName",
)
.dependsOn(core, domainMath, domainShape)
lazy val languageJava =
standardLanguageProject("java")
.settings(libraryDependencies += "com.github.javaparser" % "javaparser-core" % "3.19.0")
.settings(
mainClass in (Compile, run) := Some("org.combinators.ep.language.java.DirectToDiskMainJ")
)
lazy val languageScala = standardLanguageProject("scala")
lazy val helloWorld =
(Project(id = s"helloworld", base = file(s"helloworld")))
.settings(commonSettings: _*)
.settings(
moduleName := s"helloworld",
)
.dependsOn(core, languageJava, languageScala)
//lazy val languageGJ = standardLanguageProject("gj")
//lazy val languageCPP = standardLanguageProject("cpp")
//lazy val languageHaskell = standardLanguageProject("haskell")