Skip to content

Update Gradle to version 9.5.1 - #7703

Merged
rvandermeulen merged 5 commits into
mozilla:mainfrom
rvandermeulen:gradle-9.5
Nov 2, 2026
Merged

rvandermeulen merged 5 commits into
mozilla:mainfrom
rvandermeulen:gradle-9.5

Conversation

@rvandermeulen

@rvandermeulen rvandermeulen commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Glean moved to Gradle 9.5 in v71. This brings application-services to Gradle 9.5.1 along with the changes Gradle 9 requires:

  • Update rust-android-gradle to version 0.10.0, since 0.9.6 uses APIs that Gradle 9 removed.
  • Remove the python-envs plugin. Since Glean 71, the Glean Gradle plugin builds its glean_parser virtualenv from the system Python, so nothing uses it anymore.
  • Set mainClass on the ktlint tasks, since JavaExec.main is gone.
  • Set failOnNoDiscoveredTests = false on test tasks, as android-components does, since most components have no unit tests.

The second commit converts the Groovy DSL space-assignment syntax that Gradle 9 deprecates for removal in Gradle 10.

The Kotlin docs build also goes through the root wrapper, so it moves to Kotlin 2.3.21 and Dokka 2.2.0 (its old plugins fail on Gradle 9). The last commit removes the native libs download from Taskcluster, which has been hardcoded off since #4846.

Changes that come with it:
- Update rust-android-gradle to version 0.10.0, since 0.9.6 uses APIs that Gradle 9 removed.
- Remove the python-envs plugin, which doesn't work with Gradle 9. Since Glean 71, the Glean Gradle plugin
  builds its glean_parser virtualenv from the system Python, so nothing uses it anymore.
- Set `mainClass` on the ktlint tasks, since Gradle 9 removed `JavaExec.main`.
- Set `failOnNoDiscoveredTests = false` on test tasks, as android-components does. Gradle 9 fails a test task
  that finds no tests, and most components have no unit tests.
@rvandermeulen
rvandermeulen requested review from a team as code owners October 30, 2026 04:04
@rvandermeulen
rvandermeulen requested review from copyrighthero and removed request for a team October 30, 2026 04:04
@rvandermeulen
rvandermeulen marked this pull request as draft October 30, 2026 04:12
@rvandermeulen
rvandermeulen removed request for a team and copyrighthero October 30, 2026 04:12
Setting a property with the space syntax (`namespace 'x'`) is deprecated in Gradle 9 and scheduled for removal
in Gradle 10.
The docs build runs through the root Gradle wrapper, and the Kotlin 1.8.20 and Dokka 1.8.10 plugins fail to
configure on Gradle 9. Dokka 2 replaces the `dokkaHtml` task with `dokkaGenerate`.
Downloading prebuilt libs has been switched off with a hardcoded `useDownloadedLibs = false` since mozilla#4846 in
2022, so the download and untar tasks never ran. The only effects left were two `git` processes on every
configuration, to compute a SHA nothing read, and the gradle-download-task plugin.
@rvandermeulen

Copy link
Copy Markdown
Contributor Author

/taskcluster ci full

@rvandermeulen
rvandermeulen marked this pull request as ready for review October 30, 2026 12:31

@mhammond mhammond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rs=me

@rvandermeulen
rvandermeulen added this pull request to the merge queue Nov 2, 2026
Merged via the queue into mozilla:main with commit d6e81f5 Nov 2, 2026
15 checks passed
@rvandermeulen
rvandermeulen deleted the gradle-9.5 branch November 2, 2026 02:24
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.

2 participants