-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
55 lines (46 loc) · 1.5 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
name := "scalac-compat"
ThisBuild / tlBaseVersion := "0.1"
ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Typelevel"
ThisBuild / startYear := Some(2022)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(
tlGitHubDev("satorg", "Sergey Torgashov")
)
ThisBuild / tlSonatypeUseLegacyHost := false
val Scala212 = "2.12.20"
val Scala213 = "2.13.16"
val Scala3 = "3.3.4"
ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq(
Scala212,
Scala213,
Scala3
)
lazy val root = tlCrossRootProject.aggregate(annotation)
lazy val munitVersion = "1.0.4"
lazy val annotation = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("annotation"))
.settings(
name := "scalac-compat-annotation",
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % munitVersion % Test
),
// Required for tests but also good for the main code.
tlFatalWarnings := true,
scalacOptions := {
scalacOptions.value
.filterNot { opt =>
// Remove all partially defined options like '-Xlint:-unused'.
opt.startsWith("-Xlint") ||
opt.startsWith("-Ywarn-unused") ||
opt.startsWith("-Wunused")
} ++
CrossVersion.partialVersion(scalaVersion.value).fold(Seq.empty[String]) {
case (2, 12) => Seq("-Xlint", "-Ywarn-unused")
case (2, 13) => Seq("-Xlint", "-Wunused")
case (3, _) => Seq("-Wunused:all")
}
}
)