-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
79 lines (63 loc) · 2.15 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
lazy val scalaVersions = Seq("3.3.3", "2.13.14", "2.12.19")
ThisBuild / scalaVersion := scalaVersions.head
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "de.lhns"
name := (core.projectRefs.head / name).value
val V = new {
val catsEffect = "3.5.4"
val munit = "1.0.0"
}
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 := scmInfo.value.map(_.browseUrl),
scmInfo := Some(
ScmInfo(
url("https://github.com/lhns/munit-tagless-final"),
"scm:[email protected]:lhns/munit-tagless-final.git"
)
),
developers := List(
Developer(id = "lhns", name = "Pierre Kisters", email = "[email protected]", url = url("https://github.com/lhns/"))
),
Compile / doc / sources := Seq.empty,
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "s01.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 := "munit-tagless-final",
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % V.munit,
"org.typelevel" %%% "cats-effect-kernel" % V.catsEffect,
"org.typelevel" %%% "cats-effect" % V.catsEffect % Test,
),
testFrameworks += new TestFramework("munit.Framework"),
Test / scalaJSLinkerConfig := (Test / scalaJSLinkerConfig).value.withModuleKind(ModuleKind.CommonJSModule)
)
.jvmPlatform(scalaVersions)
.jsPlatform(scalaVersions)