You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are being incorrectly prescriptive in setting up Java in CI; the
build currently requires JDK 21 (our default compiler version), 17
(javadocs and a few projects that set compilerVersion, runtimeVersion,
or testRuntimeVersion to 17), and 11 (buildSrc explicitly sets to the 11
toolchain); we were currently getting "lucky" that all of these versions
can be implicitly sourced from the [hosted toolchain
cache](https://github.com/actions/runner-images/blob/releases/ubuntu24/20251215/images/ubuntu/Ubuntu2404-Readme.md#java)
when not explicitly installed.
We may want to consider locking this down more in the future, and _only_
telling gradle about the JDKs we've explicitly enabled; that is, _not_
implicitly sourcing from the hosted tool cache.
Instead of sourcing the JDKs one-by-one, setup-java can source multiple
at once:
https://github.com/actions/setup-java/tree/v5?tab=readme-ov-file#install-multiple-jdks
This also removes the overly-strict requirement of "JDK 11 is currently
required for CI builds". I suspect this was originally put in place as a
safety measure when the gradle javaToolchain ecosystem was less mature
and/or our setup of java requirements in gradle itself was less robust.
0 commit comments