-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
60 lines (50 loc) · 1.63 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
ThisBuild / tlBaseVersion := "0.3"
ThisBuild / organization := "org.polyvariant"
ThisBuild / organizationName := "Polyvariant"
ThisBuild / startYear := Some(2022)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(tlGitHubDev("kubukoz", "Jakub Kozłowski"))
ThisBuild / tlSonatypeUseLegacyHost := false
def crossPlugin(x: sbt.librarymanagement.ModuleID) = compilerPlugin(x.cross(CrossVersion.full))
val compilerPlugins = List(
crossPlugin("org.polyvariant" % "better-tostring" % "0.3.17")
)
val Scala213 = "2.13.10"
ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq("2.12.17", Scala213, "3.2.0")
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / tlFatalWarnings := false
ThisBuild / tlFatalWarningsInCi := false
val commonSettings = Seq(
libraryDependencies ++= compilerPlugins
)
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.settings(
name := "colorize",
commonSettings,
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % "1.0.0-M6" % Test
),
)
lazy val site = project
.in(file("site"))
.settings(
mdocOut := file("."),
mdocVariables := Map(
"VERSION" -> {
if (isSnapshot.value)
tlLatestVersion.value.getOrElse("0.1.0" /* first planned release */ )
else
version.value
}
),
ThisBuild / githubWorkflowBuild +=
WorkflowStep.Sbt(
List("site/mdoc --check"),
cond = Some(s"matrix.scala == '$Scala213'"),
),
)
.dependsOn(core.jvm)
.enablePlugins(MdocPlugin, NoPublishPlugin)
lazy val root = tlCrossRootProject
.aggregate(core)