-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.sbt
More file actions
308 lines (277 loc) · 13.3 KB
/
build.sbt
File metadata and controls
308 lines (277 loc) · 13.3 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
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
lazy val scala212 = "2.12.12"
lazy val scala213 = "2.13.3"
lazy val supportedScalaVersions = List(scala213, scala212)
/*
scalafmt: {
style = defaultWithAlign
maxColumn = 150
align.tokens = [
{ code = "=>", owner = "Case" }
{ code = "⇒", owner = "Case" }
{ code = "extends", owner = "Defn.(Class|Trait|Object)" }
{ code = "//", owner = ".*" }
{ code = "{", owner = "Template" }
{ code = "}", owner = "Template" }
{ code = ":=", owner = "Term.ApplyInfix" }
{ code = "++=", owner = "Term.ApplyInfix" }
{ code = "+=", owner = "Term.ApplyInfix" }
{ code = "%", owner = "Term.ApplyInfix" }
{ code = "%%", owner = "Term.ApplyInfix" }
{ code = "%%%", owner = "Term.ApplyInfix" }
{ code = "->", owner = "Term.ApplyInfix" }
{ code = "→", owner = "Term.ApplyInfix" }
{ code = "<-", owner = "Enumerator.Generator" }
{ code = "←", owner = "Enumerator.Generator" }
{ code = "=", owner = "(Enumerator.Val|Defn.(Va(l|r)|Def|Type))" }
]
}
*/
lazy val utilsVersion = "0.1.69" // for utilsTest
lazy val umlShaclexVersion = "0.0.70"
lazy val shexsVersion = "0.1.71"
lazy val any23Version = "2.2"
lazy val rdf4jVersion = "2.2.4"
// Dependency versions
lazy val catsVersion = "2.2.0"
lazy val commonsTextVersion = "1.7"
lazy val circeVersion = "0.14.0-M1"
lazy val graphvizJavaVersion = "0.5.2"
lazy val http4sVersion = "1.0.0-M4"
lazy val jgraphtVersion = "1.3.1"
lazy val logbackVersion = "1.2.3"
lazy val loggingVersion = "3.9.2"
lazy val plantumlVersion = "1.2017.12"
lazy val scalacheckVersion = "1.13.5"
lazy val scalaGraphVersion = "1.11.5"
// lazy val scalajVersion = "2.4.2"
lazy val scalacticVersion = "3.2.0"
lazy val scalaTestVersion = "3.2.0"
lazy val scalatestplusVersion = "3.1.0.0"
lazy val scalatagsVersion = "0.7.0"
lazy val scallopVersion = "3.3.1"
lazy val seleniumVersion = "2.45.0"
lazy val silencerVersion = "1.4.2"
lazy val typesafeConfigVersion = "1.3.4"
lazy val mongodbVersion = "4.1.1"
// WebJars
lazy val jqueryVersion = "3.4.1"
lazy val bootstrapVersion = "4.3.1"
// Scalaj
lazy val scalajVersion = "2.4.2"
// Parsing utils
lazy val playVersion = "2.9.0"
// Compiler plugin dependency versions
lazy val scalaMacrosVersion = "2.1.1"
// Dependency modules
lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion
lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion
// lazy val catsMacros = "org.typelevel" %% "cats-macros" % 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 graphvizJava = "guru.nidi" % "graphviz-java" % graphvizJavaVersion
lazy val http4sDsl = "org.http4s" %% "http4s-dsl" % http4sVersion
lazy val http4sBlazeServer = "org.http4s" %% "http4s-blaze-server" % http4sVersion
lazy val http4sBlazeClient = "org.http4s" %% "http4s-blaze-client" % http4sVersion
lazy val http4sCirce = "org.http4s" %% "http4s-circe" % http4sVersion
lazy val http4sTwirl = "org.http4s" %% "http4s-twirl" % http4sVersion
lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion
lazy val plantuml = "net.sourceforge.plantuml" % "plantuml" % plantumlVersion
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % loggingVersion
lazy val scallop = "org.rogach" %% "scallop" % scallopVersion
lazy val scalactic = "org.scalactic" %% "scalactic" % scalacticVersion
lazy val scalacheck = "org.scalacheck" %% "scalacheck" % scalacheckVersion
// lazy val scalaj = "org.scalaj" %% "scalaj-http" % scalajVersion
lazy val scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion
lazy val scalatags = "com.lihaoyi" %% "scalatags" % scalatagsVersion
lazy val selenium = "org.seleniumhq.selenium" % "selenium-java" % seleniumVersion
lazy val scalatestPlusSelenium = "org.scalatestplus" %% "selenium-2-45" % scalatestplusVersion
lazy val umlShaclex = "es.weso" %% "umlshaclex" % umlShaclexVersion
lazy val utilsTest = "es.weso" %% "utilstest" % utilsVersion
lazy val wikibaserdf = "es.weso" %% "wikibaserdf" % shexsVersion
lazy val any23_core = "org.apache.any23" % "apache-any23-core" % any23Version
lazy val any23_api = "org.apache.any23" % "apache-any23-api" % any23Version
lazy val any23_scraper = "org.apache.any23.plugins" % "apache-any23-html-scraper" % "2.2"
lazy val rdf4j_runtime = "org.eclipse.rdf4j" % "rdf4j-runtime" % rdf4jVersion
lazy val scalaj ="org.scalaj" %% "scalaj-http" % scalajVersion
lazy val play = "com.typesafe.play" %% "play-json" % playVersion
lazy val jquery = "org.webjars" % "jquery" % jqueryVersion
lazy val bootstrap = "org.webjars" % "bootstrap" % bootstrapVersion
lazy val mongodb = "org.mongodb.scala" %% "mongo-scala-driver" % mongodbVersion
// Compiler plugin modules
lazy val scalaMacrosParadise = "org.scalamacros" % "paradise" % scalaMacrosVersion cross CrossVersion.full
//lazy val simulacrum = "com.github.mpilquist" %% "simulacrum" % simulacrumVersion
//lazy val kindProjector = "org.spire-math" %% "kind-projector" % kindProjectorVersion
lazy val rdfshape = project
.in(file("."))
.enablePlugins(
ScalaUnidocPlugin,
SiteScaladocPlugin,
AsciidoctorPlugin,
SbtNativePackager,
WindowsPlugin,
JavaAppPackaging,
DockerPlugin
)
.disablePlugins(RevolverPlugin)
.aggregate(server)
.dependsOn(server)
.settings(
dockerExposedPorts ++= Seq(80),
siteSubdirName in ScalaUnidoc := "scaladoc/latest",
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(noDocProjects: _*),
mappings in makeSite ++= Seq(
file("src/assets/favicon.ico") -> "favicon.ico"
),
libraryDependencies ++= Seq(
logbackClassic,
scalaLogging,
scallop,
compilerPlugin("com.github.ghik" %% "silencer-plugin" % silencerVersion),
"com.github.ghik" %% "silencer-lib" % silencerVersion % Provided
),
cancelable in Global := true,
fork := true,
reStartArgs := Seq("--server"),
crossScalaVersions := supportedScalaVersions,
// parallelExecution in Test := false
).settings(commonSettings, packagingSettings, publishSettings, ghPagesSettings, wixSettings)
lazy val server = project
.in(file("modules/server"))
.enablePlugins(SbtTwirl, BuildInfoPlugin)
.settings(commonSettings, publishSettings)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "es.weso.rdfshape.buildinfo"
)
.settings(
libraryDependencies ++= Seq(
http4sDsl,
http4sBlazeServer,
http4sBlazeClient,
http4sCirce,
http4sTwirl,
scalatags,
selenium,
umlShaclex,
wikibaserdf,
any23_core, any23_api, any23_scraper,
rdf4j_runtime,
plantuml,
graphvizJava,
scalaj,
play,
utilsTest % Test,
mongodb,
// webJars
jquery,
bootstrap,
),
crossScalaVersions := supportedScalaVersions,
)
/* ********************************************************
******************** Grouped Settings ********************
**********************************************************/
lazy val noDocProjects = Seq[ProjectReference]()
lazy val noPublishSettings = Seq(
// publish := (),
// publishLocal := (),
publishArtifact := false
)
lazy val sharedDependencies = Seq(
libraryDependencies ++= Seq(
scalactic,
scalaTest % Test
)
)
lazy val packagingSettings = Seq(
mainClass in Compile := Some("es.weso.rdfshape.Main"),
mainClass in assembly := Some("es.weso.rdfshape.Main"),
test in assembly := {},
assemblyJarName in assembly := "rdfshape.jar",
packageSummary in Linux := name.value,
packageSummary in Windows := name.value,
packageDescription := name.value
)
lazy val compilationSettings = Seq(
scalaVersion := "2.12.11",
// 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.
// "-Xfuture", // Turn on future language features.
// "-Xlint",
"-Yrangepos",
// "-Ylog-classpath",
// "-Yno-adapted-args", // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver
// "-Ywarn-dead-code", // Warn when dead code is identified.
// "-Ywarn-extra-implicit", // Warn when more than one implicit parameter section is defined.
// "-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
// "-Ywarn-infer-any", // Warn when a type argument is inferred to be `Any`.
// "-Ywarn-nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
// "-Ywarn-nullary-unit", // Warn when nullary methods return Unit.
// "-Ywarn-numeric-widen", // Warn when numerics are widened.
// "-Ywarn-unused:implicits", // Warn if an implicit parameter is unused.
// "-Ywarn-unused:imports", // Warn if an import selector is not referenced.
// "-Ywarn-unused:locals", // Warn if a local definition is unused.
// "-Ywarn-unused:params", // Warn if a value parameter is unused.
// "-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
// "-Ywarn-unused:privates", // Warn if a private member is unused.
// "-Ywarn-value-discard", // Warn when non-Unit expression results are unused.
// "-Xfatal-warnings", // Fail the compilation if there are any warnings.
// "-Ypartial-unification",
)
)
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 := "git@github.com:labra/rdfshape.git"
)
lazy val commonSettings = compilationSettings ++ sharedDependencies ++ Seq(
organization := "es.weso",
resolvers ++= Seq(
Resolver.bintrayRepo("labra", "maven"),
Resolver.bintrayRepo("weso", "weso-releases"),
Resolver.sonatypeRepo("snapshots")
)
)
lazy val publishSettings = Seq(
maintainer := "Jose Emilio Labra Gayo <labra@uniovi.es>",
homepage := Some(url("https://github.com/labra/rdfshape")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(ScmInfo(url("https://github.com/labra/rdfshape"), "scm:git:git@github.com:labra/rdfshape.git")),
autoAPIMappings := true,
apiURL := Some(url("http://labra.github.io/rdfshape/latest/api/")),
pomExtra := <developers>
<developer>
<id>labra</id>
<name>Jose Emilio Labra Gayo</name>
<url>https://github.com/labra/</url>
</developer>
</developers>,
scalacOptions in doc ++= Seq(
"-diagrams-debug",
"-doc-source-url",
scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala",
"-sourcepath",
baseDirectory.in(LocalRootProject).value.getAbsolutePath,
"-diagrams",
),
publishMavenStyle := true,
bintrayRepository in bintray := "weso-releases",
bintrayOrganization in bintray := Some("weso")
)
// silence all warnings on autogenerated files
scalacOptions += "-P:silencer:pathFilters=target/.*"
// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"