From 11bff4c63742cddecb81d1637d596b39a6a4f705 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Wed, 9 Apr 2025 21:54:41 +0200 Subject: [PATCH 1/5] Upgrade google formatter to v1.24.0 - the last version supporting Java 11 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d6bcdd0..d7182ad 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val plugin = project ScmInfo(url("https://github.com/sbt/sbt-java-formatter"), "scm:git:git@github.com:sbt/sbt-java-formatter.git")), developers := List( Developer("ktoso", "Konrad 'ktoso' Malawski", "", url("https://github.com/ktoso"))), - libraryDependencies ++= Seq("com.google.googlejavaformat" % "google-java-format" % "1.7"), + libraryDependencies ++= Seq("com.google.googlejavaformat" % "google-java-format" % "1.24.0"), startYear := Some(2015), description := "Formats Java code in your project.", licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")), From 783b583e81917a07e4d0cd80e9ce90ddda7324e3 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 10 Apr 2025 11:17:34 +0200 Subject: [PATCH 2/5] Pin scala steward to v1.24 --- .scala-steward.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.scala-steward.conf b/.scala-steward.conf index 5918d5a..847e1bf 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1,9 +1,9 @@ // really slow dependency updates, please pullRequests.frequency = "90 days" -updates.ignore = [ - // Releases after 1.7 require JDK 11 - // https://github.com/google/google-java-format/releases/tag/google-java-format-1.8 - { groupId = "com.google.googlejavaformat", artifactId = "google-java-format" } +updates.pin = [ + // Releases after 1.24.x require JDK 17 + // https://github.com/google/google-java-format/releases/tag/v1.25.0 + { groupId = "com.google.googlejavaformat", artifactId = "google-java-format", version = "1.24." } ] commits.message = "bump: ${artifactName} ${nextVersion} (was ${currentVersion})" From 87c878b7311c8bd6d5426028c8b14d3874d14fe4 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 10 Apr 2025 12:00:56 +0200 Subject: [PATCH 3/5] Need to use Scala 2.12.18 which fixes compile bug with enum --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d7182ad..aa0dcdf 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -lazy val scala212 = "2.12.15" +lazy val scala212 = "2.12.18" lazy val scala3 = "3.6.4" ThisBuild / scalaVersion := scala212 ThisBuild / crossScalaVersions := Seq(scala212, scala3) From 4654a46792a1e1ef0b4464f5a07e63a48cd1d41e Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 10 Apr 2025 12:11:24 +0200 Subject: [PATCH 4/5] Need to cross build against newer sbt that comes with Scala 2.12.18 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index aa0dcdf..ba8d7a1 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ lazy val plugin = project licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")), (pluginCrossBuild / sbtVersion) := { scalaBinaryVersion.value match { - case "2.12" => "1.5.8" + case "2.12" => "1.9.0" case _ => "2.0.0-M4" } }, From eb20d5b97d81a8ff6f2470ebd46124072603c2a8 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 10 Apr 2025 11:21:37 +0200 Subject: [PATCH 5/5] Build / publish with Java 11 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 082f60b..87720d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,11 +12,11 @@ jobs: matrix: include: - os: ubuntu-latest - java: 8 + java: 11 distribution: zulu jobtype: 1 - os: ubuntu-latest - java: 8 + java: 11 distribution: zulu jobtype: 2 runs-on: ${{ matrix.os }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f90c5b..1a6cee1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,12 +16,12 @@ jobs: - name: Setup Scala uses: olafurpg/setup-scala@v13 with: - java-version: "adopt@1.8" + java-version: "adopt@11" - name: Setup JDK uses: actions/setup-java@v4 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - uses: sbt/setup-sbt@v1 - name: Release