From ddc2b501d5d548dae1eab5a9f08477bd223158b5 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 26 Jun 2020 10:08:08 +0200 Subject: [PATCH] Cross build for Scala 2.13.3 * `-Xlint:nullary-override` is no longer accepted by scalac 2.13.3 (on by default) --- .github/workflows/pr-checks.yml | 1 + build.sbt | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 2b2efde6..7900fa6e 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -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 diff --git a/build.sbt b/build.sbt index 07134b3f..28f1b712 100644 --- a/build.sbt +++ b/build.sbt @@ -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 := { @@ -38,7 +38,6 @@ val scalac13Options = Seq( "-Xlint:adapted-args", "-Xlint:inaccessible", "-Xlint:infer-any", - "-Xlint:nullary-override", "-Xlint:nullary-unit", "-Yrangepos", "-Ywarn-unused" @@ -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")