-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
80 lines (65 loc) · 2.34 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 scalaVersions = Seq("3.3.4", "2.13.13", "2.12.19")
lazy val scalaVersionsJvm = Seq("2.11.12")
ThisBuild / scalaVersion := scalaVersions.head
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "de.bitmarck.bms"
name := (core.projectRefs.head / name).value
val V = new {
val betterMonadicFor = "0.3.1"
val logbackClassic = "1.5.16"
val munit = "0.7.29"
}
lazy val commonSettings: SettingsDefinition = Def.settings(
version := {
val Tag = "refs/tags/v?([0-9]+(?:\\.[0-9]+)+(?:[+-].*)?)".r
sys.env.get("CI_VERSION").collect { case Tag(tag) => tag }
.getOrElse("0.0.1-SNAPSHOT")
},
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://base32check.org")),
scmInfo := Some(
ScmInfo(
url("https://github.com/bitmarck-service/base32check-scala"),
"scm:git@github.com:bitmarck-service/base32check-scala.git"
)
),
developers := List(
Developer(id = "u016595", name = "Pierre Kisters", email = "pierre.kisters@bitmarck.de", url = url("https://github.com/lhns/"))
),
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % V.logbackClassic % Test,
"org.scalameta" %%% "munit" % V.munit % Test,
),
testFrameworks += new TestFramework("munit.Framework"),
libraryDependencies ++= virtualAxes.?.value.getOrElse(Seq.empty).collectFirst {
case VirtualAxis.ScalaVersionAxis(version, _) if version.startsWith("2.") =>
compilerPlugin("com.olegpy" %% "better-monadic-for" % V.betterMonadicFor)
},
Compile / doc / sources := Seq.empty,
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "oss.sonatype.org",
credentials ++= (for {
username <- sys.env.get("SONATYPE_USERNAME")
password <- sys.env.get("SONATYPE_PASSWORD")
} yield Credentials(
"Sonatype Nexus Repository Manager",
sonatypeCredentialHost.value,
username,
password
)).toList
)
lazy val root: Project = project.in(file("."))
.settings(commonSettings)
.settings(
publishArtifact := false,
publish / skip := true
)
.aggregate(core.projectRefs: _*)
lazy val core = projectMatrix.in(file("core"))
.settings(commonSettings)
.settings(
name := "base32check-scala",
)
.jvmPlatform(scalaVersions ++ scalaVersionsJvm)
.jsPlatform(scalaVersions)