-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
75 lines (67 loc) · 2.48 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
import scala.collection.immutable
lazy val V = new {
val SCALA_2_12 = "2.12.18"
val SCALA_2_13 = "2.13.11"
val SCALA_3 = "3.3.3"
val Scalas = Seq(SCALA_2_13, SCALA_2_12, SCALA_3)
val literally = "1.1.0"
val scalaJavaTime = "2.5.0"
val munit = "1.0.0-M8"
}
ThisBuild / scalaVersion := V.Scalas.head
ThisBuild / crossScalaVersions := V.Scalas
ThisBuild / organization := "dev.holt"
ThisBuild / homepage := Option(url("https://github.com/bpholt/java-time-literals"))
ThisBuild / licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
ThisBuild / developers := List(
Developer(
"bpholt",
"Brian Holt",
url("https://holt.dev")
)
)
ThisBuild / startYear := Option(2021)
ThisBuild / tlBaseVersion := "1.1"
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / mergifyStewardConfig ~= {
_.map(_.copy(mergeMinors = true))
}
ThisBuild / mergifySuccessConditions += MergifyCondition.Custom("#approved-reviews-by>=1")
ThisBuild / mergifyRequiredJobs ++= Seq("validate-steward")
tpolecatScalacOptions += ScalacOptions.release("8")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / githubWorkflowScalaVersions := Seq("3", "2.13", "2.12")
ThisBuild / tlSonatypeUseLegacyHost := false
lazy val `java-time-literals` = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.in(file("core"))
.settings(
description := "Parse string literals into `java.time` instances at compile time",
libraryDependencies ++= {
val scalaReflect: immutable.Seq[ModuleID] =
if (scalaVersion.value.startsWith("3")) Nil
else List("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided)
scalaReflect ++
Seq(
"org.typelevel" %%% "literally" % V.literally,
"io.github.cquiroz" %%% "scala-java-time" % V.scalaJavaTime,
"org.scalameta" %%% "munit" % V.munit % Test,
"org.scalameta" %%% "munit-scalacheck" % V.munit % Test,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % V.scalaJavaTime % Test,
)
},
)
.jsSettings(
Test / scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) },
)
.nativeSettings(
tlVersionIntroduced := Map("2.12" -> "1.1.1", "2.13" -> "1.1.1", "3" -> "1.1.1"),
)
lazy val `java-time-literals-root`: Project = (project in file("."))
.settings(
publish / skip := true,
publishArtifact := false,
)
.aggregate(
`java-time-literals`.componentProjects.map(_.project) *
)