-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
186 lines (167 loc) · 6.8 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
lazy val scala212 = "2.12.19"
lazy val scala213 = "2.13.10"
lazy val scala3 = "3.2.1"
lazy val supportedScalaVersions = List(
scala3,
scala213,
scala212
)
val Java11 = JavaSpec.temurin("11") // "[email protected]"
lazy val srdfVersion = "0.1.125"
lazy val shaclexVersion = "0.2.4"
lazy val shaclsVersion = "0.1.83"
lazy val shexsVersion = "0.2.33"
// Dependency versions
lazy val munitVersion = "0.7.29"
lazy val munitEffectVersion = "1.0.7"
lazy val plantumlVersion = "1.2017.12"
lazy val logbackVersion = "1.2.11"
lazy val loggingVersion = "3.9.4"
lazy val scallopVersion = "4.1.0"
// Compiler plugin dependency versions
// lazy val simulacrumVersion = "0.19.0"
// lazy val kindProjectorVersion = "0.9.5"
// lazy val scalaMacrosVersion = "2.1.1"
// Dependency modules
// lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion
lazy val munit = "org.scalameta" %% "munit" % munitVersion
lazy val munitEffect =
"org.typelevel" %% "munit-cats-effect-3" % munitEffectVersion
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 scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion
lazy val shex = "es.weso" %% "shex" % shexsVersion
lazy val shacl = "es.weso" %% "shacl" % shaclsVersion
lazy val schema = "es.weso" %% "schema" % shaclexVersion
lazy val schemaInfer = "es.weso" %% "schemainfer" % shaclexVersion
lazy val sgraph = "es.weso" %% "sgraph" % shaclexVersion
lazy val srdfJena = "es.weso" %% "srdfjena" % srdfVersion
lazy val utilsTest = "es.weso" %% "utilstest" % shaclexVersion
lazy val MUnitFramework = new TestFramework("munit.Framework")
// Compiler plugin modules
// lazy val simulacrum = "com.github.mpilquist" %% "simulacrum" % simulacrumVersion
ThisBuild / githubWorkflowJavaVersions := Seq(Java11)
lazy val umlShaclex = project
.in(file("."))
.enablePlugins(
ScalaUnidocPlugin,
SiteScaladocPlugin,
AsciidoctorPlugin,
SbtNativePackager,
WindowsPlugin,
JavaAppPackaging
)
// .settings(
// buildInfoKeys := BuildInfoKey.ofN(name, version, scalaVersion, sbtVersion),
// buildInfoPackage := "es.weso.shaclex.buildinfo"
// )
.settings(commonSettings, publishSettings)
.settings(
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(
noDocProjects: _*
),
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,
shex,
schema,
schemaInfer,
shacl,
sgraph,
plantuml,
srdfJena
),
testFrameworks += MUnitFramework,
cancelable in Global := true,
fork := true,
crossScalaVersions := supportedScalaVersions
// crossScalaVersions := Nil,
// publish / skip := true
)
/* ********************************************************
******************** Grouped Settings ********************
**********************************************************/
lazy val noDocProjects = Seq[ProjectReference]()
lazy val noPublishSettings = Seq(
publishArtifact := false
)
lazy val sharedDependencies = Seq(
libraryDependencies ++= Seq(
// scalactic,
munitEffect % Test
)
)
lazy val compilationSettings = Seq(
// format: off
// javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
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:_",
"-target:jvm-1.8",
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-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",
)
// format: on
)
lazy val commonSettings = compilationSettings ++ sharedDependencies ++ Seq(
organization := "es.weso"
)
lazy val publishSettings = Seq(
sonatypeProfileName := ("es.weso"),
homepage := Some(url("https://github.com/labra/umlShaclex")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(
ScmInfo(
url("https://github.com/labra/umlShaclex"),
"scm:git:[email protected]:labra/umlShaclex.git"
)
),
autoAPIMappings := true,
apiURL := Some(url("http://labra.github.io/umlShaclex/latest/api/")),
developers := List(
Developer(
id = "labra",
name = "Jose Emilio Labra Gayo",
email = "[email protected]",
url = url("https://weso.labra.es")
)
),
publishMavenStyle := true
)