Skip to content

Commit

Permalink
Use Java 21 LTS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rtyley committed Mar 14, 2024
1 parent e5c513a commit ab72842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-release.yml
Expand Up @@ -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:
Expand Down

0 comments on commit ab72842

Please sign in to comment.