-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sbt
331 lines (307 loc) · 10.7 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
lazy val scala212 = "2.12.17"
lazy val scala213 = "2.13.10"
lazy val scala3 = "3.2.1"
lazy val supportedScalaVersions = List(
scala3,
scala212,
scala213
)
val Java11 = JavaSpec.temurin("11") // "[email protected]"
// Local dependencies
lazy val srdfVersion = "0.1.125"
lazy val utilsVersion = "0.2.25"
lazy val shexVersion = "0.2.33"
lazy val shaclVersion = "0.1.83"
// Dependency versions
lazy val catsVersion = "2.9.0"
lazy val circeVersion = "0.14.2"
lazy val jenaVersion = "4.4.0"
lazy val jgraphtVersion = "1.3.1"
lazy val jlineVersion = "3.21.0"
lazy val jnaVersion = "5.11.0"
lazy val logbackVersion = "1.2.11"
lazy val loggingVersion = "3.9.4"
lazy val munitVersion = "0.7.29"
lazy val munitEffectVersion = "1.0.7"
lazy val pprintVersion = "0.7.3"
lazy val rdf4jVersion = "3.7.6"
lazy val scalacheckVersion = "1.15.4"
lazy val scallopVersion = "4.1.0"
lazy val shaclTQVersion = "1.4.0"
lazy val typesafeConfigVersion = "1.4.2"
// Compiler plugin dependency versions
lazy val simulacrumVersion = "1.0.0"
// lazy val kindProjectorVersion = "0.9.5"
// lazy val scalaMacrosVersion = "2.1.1"
// WESO components
lazy val srdf = "es.weso" %% "srdf" % srdfVersion
lazy val srdfJena = "es.weso" %% "srdfjena" % srdfVersion
lazy val srdf4j = "es.weso" %% "srdf4j" % srdfVersion
lazy val utils = "es.weso" %% "utils" % utilsVersion
lazy val typing = "es.weso" %% "typing" % utilsVersion
lazy val validating = "es.weso" %% "validating" % utilsVersion
lazy val utilsTest = "es.weso" %% "utilstest" % utilsVersion
lazy val shex = "es.weso" %% "shex" % shexVersion
lazy val shexTest = "es.weso" %% "shextest" % shexVersion
lazy val shapemap = "es.weso" %% "shapemap" % shexVersion
lazy val shacl = "es.weso" %% "shacl" % shaclVersion
// Other dependency modules
lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion
lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion
lazy val circeCore = "io.circe" %% "circe-core" % circeVersion
lazy val circeGeneric = "io.circe" %% "circe-generic" % circeVersion
lazy val circeParser = "io.circe" %% "circe-parser" % circeVersion
lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion
lazy val jenaArq = "org.apache.jena" % "jena-arq" % jenaVersion
lazy val jenaShacl = "org.apache.jena" % "jena-shacl" % jenaVersion
lazy val jenaShEx = "org.apache.jena" % "jena-shex" % jenaVersion
lazy val jenaFuseki = "org.apache.jena" % "jena-fuseki-main" % jenaVersion
lazy val jline = "org.jline" % "jline" % jlineVersion
lazy val jna = "net.java.dev.jna" % "jna" % jnaVersion
lazy val munit = "org.scalameta" %% "munit" % munitVersion
lazy val munitEffect = "org.typelevel" %% "munit-cats-effect-3" % munitEffectVersion
lazy val MUnitFramework = new TestFramework("munit.Framework")
lazy val pprint = "com.lihaoyi" %% "pprint" % pprintVersion
lazy val rdf4j_runtime = "org.eclipse.rdf4j" % "rdf4j-runtime" % rdf4jVersion
lazy val shaclTQ = "org.topbraid" % "shacl" % shaclTQVersion
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % loggingVersion
lazy val scallop = "org.rogach" %% "scallop" % scallopVersion
lazy val typesafeConfig = "com.typesafe" % "config" % typesafeConfigVersion
ThisBuild / githubWorkflowJavaVersions := Seq(Java11)
lazy val shaclex = project
.in(file("."))
.enablePlugins(
ScalaUnidocPlugin,
SiteScaladocPlugin,
AsciidoctorPlugin,
// SbtNativePackager,
WindowsPlugin,
JavaAppPackaging,
LauncherJarPlugin
)
// .disablePlugins(RevolverPlugin)
// .settings(
// buildInfoKeys := BuildInfoKey.ofN(name, version, scalaVersion, sbtVersion),
// buildInfoPackage := "es.weso.shaclex.buildinfo"
// )
.settings(commonSettings, packagingSettings, ghPagesSettings, publishSettings, wixSettings)
.aggregate(schemaInfer, schema, converter, slang, sgraph)
.dependsOn(schemaInfer, schema, converter, slang, sgraph)
.settings(
crossScalaVersions := supportedScalaVersions,
// ScalaUnidoc / siteSubdirName := "scaladoc/latest",
// addMappingsToSiteDir(mappings in(ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(noDocProjects: _*),
makeSite / mappings ++= Seq(
file("src/assets/favicon.ico") -> "favicon.ico"
),
libraryDependencies ++= Seq(
logbackClassic,
scalaLogging,
scallop,
typesafeConfig,
shexTest,
jline,
jna
),
Global / cancelable := true,
fork := true,
// parallelExecution in Test := false,
ThisBuild / turbo := true
// skip in publish := true
)
lazy val schemaInfer = project
.in(file("modules/schemaInfer"))
// .disablePlugins(RevolverPlugin)
.settings(
crossScalaVersions := supportedScalaVersions,
commonSettings,
publishSettings,
libraryDependencies ++= Seq(srdf)
)
.dependsOn(
schema
)
lazy val schema = project
.in(file("modules/schema"))
.settings(
crossScalaVersions := supportedScalaVersions,
commonSettings,
publishSettings,
libraryDependencies ++= Seq(
scalaLogging,
srdf,
srdfJena,
srdf4j,
shex,
shacl,
shapemap,
jenaShacl,
jenaShEx,
shaclTQ,
munitEffect % Test
),
testFrameworks += MUnitFramework
)
.dependsOn(
slang,
converter
)
lazy val slang = project
.in(file("modules/slang"))
// .disablePlugins(RevolverPlugin)
.settings(commonSettings, publishSettings)
.dependsOn(
)
.settings(
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= Seq(
scalaLogging,
catsCore,
catsKernel,
// catsMacros,
shex,
shacl,
utils,
srdf,
srdf4j % Test,
srdfJena % Test
)
)
lazy val sgraph = project
.in(file("modules/sgraph"))
// .disablePlugins(RevolverPlugin)
.settings(
crossScalaVersions := supportedScalaVersions,
commonSettings,
publishSettings,
libraryDependencies ++= Seq(
scalaLogging,
utils,
utilsTest % Test,
srdf,
catsCore,
catsKernel,
// catsMacros,
srdf4j % Test,
srdfJena % Test,
munit % Test,
munitEffect % Test
),
testFrameworks += MUnitFramework
)
lazy val converter = project
.in(file("modules/converter"))
// .disablePlugins(RevolverPlugin)
.settings(
crossScalaVersions := supportedScalaVersions,
commonSettings,
publishSettings,
libraryDependencies ++= Seq(
scalaLogging,
logbackClassic,
scalaLogging,
srdfJena % Test,
shex,
shacl,
pprint,
munit % Test,
munitEffect % Test
),
testFrameworks += MUnitFramework
)
/* ********************************************************
******************** Grouped Settings ********************
**********************************************************/
lazy val noDocProjects = Seq[ProjectReference]()
lazy val sharedDependencies = Seq(
libraryDependencies ++= Seq(
// scalactic,
// scalaTest % Test
)
)
lazy val packagingSettings = Seq(
// Do not package logback files in .jar, they interfere with other logback
// files in classpath
Compile / packageBin / mappings ~= { project =>
project.filter {
case (file, _) =>
val fileName = file.getName
!(fileName.startsWith("logback") && (fileName.endsWith(".xml") || fileName
.endsWith(".groovy")))
}
},
Compile / mainClass := Some("es.weso.shaclex.Main"),
assembly / mainClass := Some("es.weso.shaclex.Main"),
assembly / test := {},
assembly / assemblyJarName := "shaclex.jar",
Linux / packageSummary := name.value,
Windows / packageSummary := name.value,
packageDescription := name.value
)
lazy val compilationSettings = Seq(
// scalaVersion := "2.13.1",
// format: off
scalacOptions ++= Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-encoding", "utf-8", // Specify character encoding used by source files.
"-explaintypes", // Explain type errors in more detail.
"-feature", // Emit warning and location for usages of features that should be imported explicitly. "-encoding", "UTF-8",
"-language:_",
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-Xlint",
"-Yrangepos",
"-Ywarn-dead-code", // Warn when dead code is identified.
// "-Xfatal-warnings",
"-Ywarn-extra-implicit" // Warn when more than one implicit parameter section is defined.
)
// format: on
)
lazy val wixSettings = Seq(
wixProductId := "39b564d5-d381-4282-ada9-87244c76e14b",
wixProductUpgradeId := "6a710435-9af4-4adb-a597-98d3dd0bade1"
// The same numbers as in the docs?
// wixProductId := "ce07be71-510d-414a-92d4-dff47631848a",
// wixProductUpgradeId := "4552fb0e-e257-4dbd-9ecb-dba9dbacf424"
)
lazy val ghPagesSettings = Seq(
// git.remoteRepo := "[email protected]:weso/shaclex.git"
)
lazy val commonSettings = compilationSettings ++ sharedDependencies ++ Seq(
organization := "es.weso",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)
)
//noinspection HttpUrlsUsage
lazy val publishSettings = Seq(
// maintainer := "Jose Emilio Labra Gayo <[email protected]>",
homepage := Some(url("https://github.com/weso/shaclex")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(ScmInfo(url("https://github.com/weso/shaclex"), "scm:git:[email protected]:labra/shaclex.git")),
autoAPIMappings := true,
apiURL := Some(url("http://weso.github.io/shaclex/latest/api/")),
/* pomExtra := <developers>
<developer>
<id>labra</id>
<name>Jose Emilio Labra Gayo</name>
<url>https://labra.weso.es/</url>
</developer>
</developers>, */
publishMavenStyle := true,
sonatypeProfileName := "es.weso",
homepage := Some(url("https://github.com/weso/shaclex")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(ScmInfo(url("https://github.com/weso/shaclex"), "scm:git:[email protected]:weso/shaclex.git")),
autoAPIMappings := true,
apiURL := Some(url("http://weso.github.io/shaclex/latest/api/")),
autoAPIMappings := true,
developers := List(
Developer(
id = "labra",
name = "Jose Emilio Labra Gayo",
email = "[email protected]",
url = url("https://labra.weso.es")
)
)
)