Add Java version - see guardian/gha-scala-library-release-workflow#36 #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See guardian/gha-scala-library-release-workflow#36 -
gha-scala-library-release-workflow
has moved to requiring projects to specify what version of Java they want to use to build, and this is expressed through anasdf
-formatted.tool-versions
file.This allows individual projects to experiment with later (or even earlier) versions of Java if they wish, without requiring all other projects using
gha-scala-library-release-workflow
to upgrade their version of Java at the same time."But what if we need to support older versions of Java?"
Note that, although this PR specifies Java 21 (the latest LTS release of Java, which apparently has several performance benefits) for the library build, the artifacts released by the project do not need to require Java 21 - so long as the
scalacOptions
defined in the project'sbuild.sbt
includes a-release
flag, we can specify that we want the artifacts to support some older version of Java (eg-release:11
for Java 11).