Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java version - see guardian/gha-scala-library-release-workflow#36 #442

Merged
merged 1 commit into from
May 21, 2024

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented May 20, 2024

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 an asdf-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 maybe 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's build.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).

Copy link
Contributor

@tjsilver tjsilver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The artifacts currently support Java v8 - should we change this to v11 now?

"-release:8",

@rtyley rtyley force-pushed the add-java-version branch 2 times, most recently from ad27590 to 823fdd2 Compare May 21, 2024 09:38
Although we're _building_ with Java 21, we're also updating the minimum supported
Java version from Java 8 to Java 11:

#442 (review)

We can do this because the artifact published by this repo:

"com.gu" %% "janus-config-tools" % "1.0.0"
https://index.scala-lang.org/guardian/janus-app/artifacts/janus-config-tools

...is only consumed by these two apps, Janus & Security HQ:

* guardian/janus#3947
* guardian/security-hq#413

....both of which are now running on Java 11.
@rtyley
Copy link
Member Author

rtyley commented May 21, 2024

The artifacts currently support Java v8 - should we change this to v11 now?

Yes, good idea! We can do this because the artifact published by this repo:

"com.gu" %% "janus-config-tools" % "1.0.0"

...is only consumed by these two apps, Janus & Security HQ:

....both of which are already running on Java 11! Done with 5d660c2.

@rtyley rtyley merged commit ae71447 into main May 21, 2024
4 checks passed
@rtyley rtyley deleted the add-java-version branch May 21, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants