Skip to content

Commit

Permalink
Cross build for Scala 2.13.3
Browse files Browse the repository at this point in the history
* `-Xlint:nullary-override` is no longer accepted by scalac 2.13.3 (on by default)
* upgrade semanticdb-scalac to version 4.3.16
  • Loading branch information
avdv committed Jun 26, 2020
1 parent 029e799 commit ff07412
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- 2.12.11
- 2.13.1
- 2.13.2
- 2.13.3
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v7
Expand Down
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compiler plugins
addCompilerPlugin("org.scalameta" % "semanticdb-scalac" % "4.3.15" cross CrossVersion.full)
addCompilerPlugin("org.scalameta" % "semanticdb-scalac" % "4.3.16" cross CrossVersion.full)

name := "scalac-scapegoat-plugin"
organization := "com.sksamuel.scapegoat"
Expand All @@ -22,8 +22,8 @@ developers := List(
)
)

scalaVersion := "2.13.2"
crossScalaVersions := Seq("2.11.12", "2.12.10", "2.12.11", "2.13.1", "2.13.2")
scalaVersion := "2.13.3"
crossScalaVersions := Seq("2.11.12", "2.12.10", "2.12.11", "2.13.1", "2.13.2", "2.13.3")
autoScalaLibrary := false
crossVersion := CrossVersion.full
crossTarget := {
Expand All @@ -38,7 +38,6 @@ val scalac13Options = Seq(
"-Xlint:adapted-args",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:nullary-override",
"-Xlint:nullary-unit",
"-Yrangepos",
"-Ywarn-unused"
Expand Down Expand Up @@ -76,7 +75,11 @@ scalacOptions := {
common ++ (scalaBinaryVersion.value match {
case "2.11" => scalac11Options
case "2.12" => scalac12Options
case "2.13" => scalac13Options
case "2.13" => scalac13Options ++ (
scalaVersion.value.split('.') match {
case Array(_, _, patch) if Set("0", "1", "2")(patch) => Seq("-Xlint:nullary-override")
case _ => Seq.empty[String]
})
})
}
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
Expand Down

0 comments on commit ff07412

Please sign in to comment.