Skip to content

Bug 1785929 - Build with JDK 25 while targeting Java 17 - #3732

Draft
rvandermeulen wants to merge 1 commit into
mozilla:mainfrom
rvandermeulen:jdk-25
Draft

rvandermeulen wants to merge 1 commit into
mozilla:mainfrom
rvandermeulen:jdk-25

Conversation

@rvandermeulen

Copy link
Copy Markdown
Collaborator

Sets the Java 17 source/target and Kotlin jvmTarget directly instead of selecting a JDK 17 toolchain with jvmToolchain, 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.1 is the first CircleCI Android image that ships JDK 25, but it defaults JAVA_HOME to JDK 21, so the jobs set it explicitly.

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

No deployments
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.

1 participant