From dafb658edb821f167a109504ade6f4bca7b8849d Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Tue, 19 Oct 2021 11:40:36 -0400 Subject: [PATCH] Add Scala 3.1.0 to build --- .github/workflows/ci.yml | 7 ++++++- build.sbt | 11 +++++++++-- examples/commands-leveldb/build.sbt | 2 +- examples/commands-nix/build.sbt | 2 +- examples/commands-redis/build.sbt | 2 +- examples/scalajs/build.sbt | 2 +- examples/simple-sbt/build.sbt | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3da063a1..d545bc753 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,16 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.0.2, 2.12.15, 2.13.6] + scala: [3.1.0, 3.0.2, 2.12.15, 2.13.6] java: [adopt@1.8, adopt@1.11] platform: [jvm] workers: [1, 4] include: + - workers: 1 + os: ubuntu-latest + java: adopt@1.8 + scala: 3.1.0 + platform: js - workers: 1 os: ubuntu-latest java: adopt@1.8 diff --git a/build.sbt b/build.sbt index f1ca0060a..f4eb18115 100644 --- a/build.sbt +++ b/build.sbt @@ -2,9 +2,10 @@ sourceDirectory := file("dummy source directory") val Scala212 = "2.12.15" val Scala213 = "2.13.6" -val Scala3 = "3.0.2" +val Scala30 = "3.0.2" +val Scala31 = "3.1.0" -ThisBuild / crossScalaVersions := Seq(Scala3, Scala212, Scala213) +ThisBuild / crossScalaVersions := Seq(Scala31, Scala30, Scala212, Scala213) ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last ThisBuild / githubWorkflowPublishTargetBranches := Seq() @@ -180,6 +181,12 @@ lazy val sharedSettings = MimaSettings.settings ++ Seq( }), mimaPreviousArtifacts := Set("org.scalacheck" %%% "scalacheck" % "1.15.4"), + // Don't publish for Scala 3.1 or later, only from 3.0 + publish / skip := (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, x)) if x > 0 => true + case _ => false + }), + publishTo := { val nexus = "https://oss.sonatype.org/" val (name, path) = if (isSnapshot.value) ("snapshots", "content/repositories/snapshots") diff --git a/examples/commands-leveldb/build.sbt b/examples/commands-leveldb/build.sbt index 91e464fff..8d7565d0f 100644 --- a/examples/commands-leveldb/build.sbt +++ b/examples/commands-leveldb/build.sbt @@ -1,6 +1,6 @@ name := "commands-leveldb" -scalaVersion := "3.0.2" +scalaVersion := "3.1.0" libraryDependencies ++= Seq( "org.scalacheck" %% "scalacheck" % "1.15.4" % Test, diff --git a/examples/commands-nix/build.sbt b/examples/commands-nix/build.sbt index 7622f2b0b..e8131297d 100644 --- a/examples/commands-nix/build.sbt +++ b/examples/commands-nix/build.sbt @@ -1,6 +1,6 @@ name := "commands-nix" -scalaVersion := "3.0.2" +scalaVersion := "3.1.0" libraryDependencies ++= Seq( "org.scalacheck" %% "scalacheck" % "1.15.4" % Test, diff --git a/examples/commands-redis/build.sbt b/examples/commands-redis/build.sbt index 9cdfd00c7..707be0df2 100644 --- a/examples/commands-redis/build.sbt +++ b/examples/commands-redis/build.sbt @@ -1,6 +1,6 @@ name := "commands-redis" -scalaVersion := "3.0.2" +scalaVersion := "3.1.0" libraryDependencies ++= Seq( "org.scalacheck" %% "scalacheck" % "1.15.4" % Test, diff --git a/examples/scalajs/build.sbt b/examples/scalajs/build.sbt index dbbf47c85..93a2d460f 100644 --- a/examples/scalajs/build.sbt +++ b/examples/scalajs/build.sbt @@ -4,6 +4,6 @@ name := "ScalaCheck-scalajs-example" version := "0.1-SNAPSHOT" -scalaVersion := "3.0.2" +scalaVersion := "3.1.0" libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.15.4" % Test diff --git a/examples/simple-sbt/build.sbt b/examples/simple-sbt/build.sbt index b95427aec..14864de7a 100644 --- a/examples/simple-sbt/build.sbt +++ b/examples/simple-sbt/build.sbt @@ -1,6 +1,6 @@ name := "scalacheck-demo" -scalaVersion := "3.0.2" +scalaVersion := "3.1.0" libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.15.4" % Test