Repository navigation
Bug 1785929 - Build with JDK 25 while targeting Java 17 - #3732
Draft
rvandermeulen wants to merge 1 commit into
Draft
rvandermeulen wants to merge 1 commit into
rvandermeulen wants to merge 1 commit into
Conversation
Set the Java 17 source/target and Kotlin jvmTarget directly instead of selecting a JDK 17 toolchain, so the whole build runs on the JDK it is started with. The Gradle plugin had no target at all and would otherwise compile to the bytecode level of the building JDK, which Gradle on an older JDK cannot load. cimg/android 2026.10 is the first image with JDK 25, but its default JAVA_HOME is JDK 21.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sets the Java 17 source/target and Kotlin
jvmTargetdirectly instead of selecting a JDK 17 toolchain withjvmToolchain, so the build runs entirely on the JDK it is started with. This matches mozilla-central, which is moving its Android builds to JDK 25.The Glean Gradle plugin previously had no target level and compiled to the bytecode level of whatever JDK built it, so it now explicitly targets Java 17 too. Without that, a JDK 25 build would publish a plugin that Gradle running on an older JDK cannot load.
CI moves to JDK 25 in GitHub Actions, CircleCI and the Taskcluster image.
cimg/android:2026.10.1is the first CircleCI Android image that ships JDK 25, but it defaultsJAVA_HOMEto JDK 21, so the jobs set it explicitly.