From ab72842ddfbccaca2aef13904a5c0123d45a8bfa Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Thu, 14 Mar 2024 11:46:32 +0000 Subject: [PATCH] Use Java 21 LTS John Duffell has reported improved speed from Java 21 LTS: https://chat.google.com/room/AAAAag0I08g/Nvinl3aN_cU/ ...and Mariot has confirmed that we should be encouraging people to move to Java 21. In `gha-scala-library-release-workflow` we always use the same version of Java to _compile_ the project, regardless of the repo, because we've not yet encountered a need to configure the Java on a pre-repo basis. However, we do recommend that repos specify the `-release` flag in their `build.sbt` `scalacOptions`, which specifies the minimum release of Java that should be supported in the resulting artifacts - we still have some systems runinng on Java 8, so unfortunately they need `-release:8` https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-21-compatibility-notes --- .github/workflows/reusable-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index 96286e3..606c680 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -377,7 +377,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: corretto - java-version: 17 + java-version: 21 # This will always be a long-term support (LTS) release cache: sbt # the issue described in https://github.com/actions/setup-java/pull/564 doesn't affect this step (no version.sbt) - name: Release env: