-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
81 lines (72 loc) · 2.43 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
lazy val baseName = "Serial"
lazy val baseNameL = baseName.toLowerCase
lazy val projectVersion = "2.0.1"
lazy val mimaVersion = "2.0.0"
lazy val deps = new {
val test = new {
val scalaTest = "3.2.9"
}
}
lazy val commonJvmSettings = Seq(
crossScalaVersions := Seq("3.0.0", "2.13.4", "2.12.13"),
)
// sonatype plugin requires that these are in global
ThisBuild / version := projectVersion
ThisBuild / organization := "de.sciss"
lazy val commonSettings = Seq(
name := baseName,
// version := projectVersion,
// organization := "de.sciss",
description := "Simple binary serialization library for Scala",
homepage := Some(url(s"https://git.iem.at/sciss/${name.value}")),
licenses := Seq("LGPL v2.1+" -> url( "http://www.gnu.org/licenses/lgpl-2.1.txt")),
scalaVersion := "2.13.4",
mimaPreviousArtifacts := Set("de.sciss" %% baseNameL % mimaVersion),
libraryDependencies ++= {
// if (isDotty.value) Nil else
Seq(
"org.scalatest" %%% "scalatest" % deps.test.scalaTest % Test,
)
},
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8"),
scalacOptions ++= {
// if (isDotty.value) Nil else
Seq("-Xlint", "-Xsource:2.13")
},
scalacOptions in (Compile, compile) ++= {
// val dot = isDotty.value
if (/* !dot && */ scala.util.Properties.isJavaAtLeast("9")) {
Seq("-release", "8") // JDK >8 breaks API; skip scala-doc
} else {
Nil
}
},
testOptions in Test += Tests.Argument("-oDF"), // ScalaTest: durations and full stack traces
parallelExecution in Test := false,
// unmanagedSourceDirectories in Test := {
// if (isDotty.value) Nil else (unmanagedSourceDirectories in Test).value // while ScalaTest is unavailable
// },
)
// ---- publishing ----
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
developers := List(
Developer(
id = "sciss",
name = "Hanns Holger Rutz",
email = "contact@sciss.de",
url = url("https://www.sciss.de")
)
),
scmInfo := {
val h = "git.iem.at"
val a = s"sciss/${name.value}"
Some(ScmInfo(url(s"https://$h/$a"), s"scm:git@$h:$a.git"))
},
)
lazy val root = crossProject(JSPlatform, JVMPlatform).in(file("."))
.settings(commonSettings)
.jvmSettings(commonJvmSettings)
.settings(publishSettings)