Repository navigation
Update to Android Gradle Plugin 9.5.1 and Gradle 9.9.1 - #7791
Merged
Merged
Conversation
Matches mozilla-central. The Kotlin docs build moves with it.
The two move together: AGP 9.5.1 needs Gradle 9.6 or newer, and Gradle 9.6 removed an internal API that AGP 8 depends on. Both match mozilla-central. rust-android-gradle moves to 0.11.0, its first release that supports AGP 9. It makes the JNI merge tasks depend on cargoBuild itself, so the megazord no longer has to. AGP 9 compiles Kotlin itself, so standalone builds no longer apply the kotlin-android plugin, as mozilla-central builds already did not. android.useAndroidX is an AGP 9 default. Gradle 9.9 deprecates two lookups that fail in Gradle 10: the components now read config from the root project explicitly, and publish.gradle reads its properties through providers.
buildDir is deprecated in favor of layout.buildDirectory. There is no gradle-plugin or buildSrc directory for detekt and ktlint to scan, and four lib* properties in gradle.properties have no consumer. The detekt block moves off its deprecated input, config and xml.enabled properties, and its source tree now excludes build directories: detekt never read files there, but Gradle 9 fails a detekt run that shares an invocation with a Kotlin compile, because the tree overlaps the compiler's caches. The detekt task's exclude goes too: it passed one comma-joined pattern, which matched no file. Some mozilla-central-only configuration goes too. settings.gradle no longer overrides the build directory of the a-s projects there: mozilla-central's conventions plugin already gives every project one, which now applies to them as well. It also no longer sets gradle.ext.mozconfig, which every mozilla-central build sets before applying it. The mozilla-central arms of calcVersion and calcGroupId are unreachable, since only standalone builds call them, and the root build.gradle, which mozilla-central does not use, no longer checks for mozconfig before applying maven-publish.
Contributor
Author
|
/taskcluster ci full |
rvandermeulen
marked this pull request as ready for review
November 17, 2026 01:23
rvandermeulen
enabled auto-merge
November 17, 2026 01:25
bendk
approved these changes
Nov 18, 2026
bendk
left a comment
Contributor
There was a problem hiding this comment.
The changes look fine to me, thanks for upgrading this.
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.
AGP and Gradle move together: AGP 9.5.1 needs Gradle 9.6 or newer, and Gradle 9.6 removed an internal API that AGP 8 depends on. Both match mozilla-central, as does Kotlin 2.4.21 in its own commit.
Changes that come with it:
cargoBuilditself, so the megazord no longer has to.kotlin-androidplugin, as mozilla-central builds already did not.configfrom the root project explicitly and readpublish.gradle's properties through providers. Gradle 9.9 deprecates both implicit lookups, and they fail in Gradle 10. On the mozilla-central path, the only change is the explicitrootProject.config, which those files already use elsewhere.android.useAndroidX, which is an AGP 9 default.The last commit removes Gradle configuration that has no effect and replaces the deprecated
buildDirwithlayout.buildDirectory. There is nogradle-pluginorbuildSrcdirectory for detekt and ktlint to scan, and fourlib*properties ingradle.propertieshave no consumer. The detekt block moves off its deprecated DSL, and its source tree now excludes build directories. Detekt never read files there, but Gradle 9 fails a detekt run that shares an invocation with a Kotlin compile, because the tree overlaps the compiler's caches.It also removes mozilla-central-only configuration that is no longer needed.
settings.gradleno longer overrides the build directory of the a-s projects in mozilla-central; the conventions plugin already gives every in-tree project one, so their outputs move togradle/build/third_party/application-services/...in the objdir, like every other project. It no longer setsgradle.ext.mozconfig, which each mozilla-central build sets before applying it. The mozilla-central arms ofcalcVersionandcalcGroupIdare dropped because only standalone builds call them.