-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sbt
More file actions
149 lines (126 loc) · 4.9 KB
/
build.sbt
File metadata and controls
149 lines (126 loc) · 4.9 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import sbt.Keys._
import sbt.Resolver
import xerial.sbt.Sonatype.sonatypeCentralHost
/** Settings shared globally. **/
lazy val commonSettings = Seq(
organization := "org.combinators",
scalaVersion := "3.7.4",
resolvers += Resolver.typesafeRepo("releases"),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
Compile/scalacOptions ++= Seq(
"-explain",
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions",
"-language:higherKinds",
"-Xkind-projector:underscores",
),
libraryDependencies ++= Seq(
"commons-io"% "commons-io" % "2.19.0",
"org.combinators" %% "templating" % "1.1.5",
"org.scalactic" %% "scalactic" % "3.2.19" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.typelevel" %% "cats-core" % "2.13.0",
"org.typelevel" %% "cats-free" % "2.13.0",
"org.typelevel" %% "cats-effect" % "3.6.1"
),
evictionErrorLevel := Level.Info,
)
lazy val publishSettings = Seq(
homepage := Some(url("https://combinators.org")),
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(ScmInfo(url("https://www.github.com/combinators/expression-problem"), "scm:git:git@github.com:combinators/expression-problem.git")),
developers := List(
Developer("JanBessai", "Jan Bessai", "jan.bessai@tu-dortmund.de", url("http://noprotocol.net")),
Developer("heineman", "George T. Heineman", "heineman@wpi.edu", url("http://www.cs.wpi.edu/~heineman")),
Developer("BorisDuedder", "Boris Düdder", "boris.d@di.ku.dk", url("http://duedder.net"))
),
publishTo := sonatypePublishToBundle.value,
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost,
) ++ sys.env.get("PGP_KEY_HEX").map(h => usePgpKeyHex(h)).seq
lazy val noPublishSettings = Seq(
publish := Seq.empty,
publishLocal := Seq.empty,
publishArtifact := false,
publish / skip := true,
)
lazy val root = (Project(id = "root", base = file(".")))
.settings(noPublishSettings: _*)
.aggregate(cogen, languageJava, languageInbetween, languageNewScala)
/** The code generation infrastructure used in languages.
* Things in here are (DI, LI, AI).
*/
lazy val cogen = (Project(id = "cogen", base = file("cogen")))
.settings(commonSettings: _*)
.settings(
moduleName := "expression-problem-cogen",
)
.settings(publishSettings: _*)
/** 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(noPublishSettings: _*)
.settings(
moduleName := "expression-problem-core",
)
.dependsOn(cogen)
lazy val approach = (Project(id = "approach", base = file("approach")))
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
.settings(
moduleName := "expression-problem-approach",
)
.dependsOn(cogen, core)
/** 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(noPublishSettings: _*)
.settings(
moduleName := s"expression-problem-domain-$domainName"
)
.dependsOn(cogen, 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",
)
.settings(publishSettings: _*)
.dependsOn(cogen)
lazy val languageJava =
standardLanguageProject("java")
.settings(libraryDependencies += "com.github.javaparser" % "javaparser-core" % "3.26.4")
lazy val helloWorldProject: Project =
(Project(id = s"helloWorld", base = file(s"helloworld")))
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
.settings(
moduleName := s"expression-problem-language-helloworld",
)
.dependsOn(cogen, languageJava, languageNewScala)
lazy val languageInbetween =
standardLanguageProject("inbetween")
lazy val languageNewScala =
standardLanguageProject("newScala")
.dependsOn(languageInbetween)
lazy val builder =
(Project(id = s"builder", base = file(s"builder")))
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
.settings(
moduleName := s"expression-problem-language-builder",
)
.dependsOn(core, cogen, approach, domainMath, domainShape, languageJava, languageNewScala, helloWorldProject)