From 5b97208171fbb257a082fc6d5833eab5a7600b7a Mon Sep 17 00:00:00 2001 From: regadas Date: Fri, 13 May 2022 14:22:32 +0100 Subject: [PATCH] Allow Scala 3 update --- .github/workflows/ci.yml | 8 ++++---- build.sbt | 12 +++++++++++- project/build.properties | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56738bc4..4f50d3da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.0.2, 2.11.12, 2.12.15, 2.13.8] + scala: [3.1.2, 2.11.12, 2.12.15, 2.13.8] java: [temurin@8] runs-on: ${{ matrix.os }} steps: @@ -133,12 +133,12 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (3.0.2) + - name: Download target directories (3.1.2) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.0.2 + name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.2 - - name: Inflate target directories (3.0.2) + - name: Inflate target directories (3.1.2) run: | tar xf targets.tar rm targets.tar diff --git a/build.sbt b/build.sbt index 264fc53d..ad0ad460 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ ThisBuild / tlBaseVersion := "0.3" ThisBuild / startYear := Some(2021) ThisBuild / developers += tlGitHubDev("johnynek", "P. Oscar Boykin") -ThisBuild / crossScalaVersions := List("3.0.2", "2.11.12", "2.12.15", "2.13.8") +ThisBuild / crossScalaVersions := List("3.1.2", "2.11.12", "2.12.15", "2.13.8") ThisBuild / tlVersionIntroduced := Map("3" -> "0.3.4") ThisBuild / githubWorkflowBuild := Seq( @@ -74,6 +74,15 @@ lazy val jvmVersionSettings = VersionNumber(sys.props("java.version")) match { case _ => Def.settings() } +lazy val publishSettings = Def.settings { + scalaOutputVersion := { + CrossVersion.partialVersion((scalaVersion).value) match { + case Some((3, _)) => "3.0.2" + case _ => scalaVersion.value + } + } +} + lazy val root = project .in(file(".")) .aggregate(core.jvm, core.js, bench) @@ -110,6 +119,7 @@ lazy val docs = project lazy val core = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Full) + .settings(publishSettings) .settings( name := "cats-parse", tlFatalWarningsInCi := !tlIsScala3.value, diff --git a/project/build.properties b/project/build.properties index c8fcab54..0fdeb713 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.0-M2 \ No newline at end of file