Skip to content

ADFA-6400: Prepare the build scripts for Gradle 9 - #2271

Open
Daniel-ADFA wants to merge 2 commits into
feat/ADFA-6400-build-toolchainfrom
feat/ADFA-6400-gradle9-groundwork
Open

Daniel-ADFA wants to merge 2 commits into
feat/ADFA-6400-build-toolchainfrom
feat/ADFA-6400-gradle9-groundwork

Conversation

@Daniel-ADFA

@Daniel-ADFA Daniel-ADFA commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-6400

First step of moving CoGo's own build to Gradle 9.6.1 and AGP 9.3.1. These are the build-script changes Gradle 9 and AGP 9 need, made so they also work on today's Gradle 8.14.4 and AGP 8.8.2. The version bump comes in a follow-up PR.

  • settings.gradle.kts drops :compose-preview, whose directory went away when it moved into a plugin. Gradle 9 refuses to configure it.
  • SigningKeyUtils uses providers.exec; Project.exec is gone in Gradle 9.
  • AndroidModuleConf sets lint and packaging through properties; AGP 9's CommonExtension has no lint {} or packaging {} blocks.
  • gradle-wrapper.zip is built with Gradle's public Wrapper task. IDEWrapperGenerator and GradleVersionResolver (a copy of Gradle's wrapper task on internals that changed in Gradle 9) are deleted. The zip keeps the same jar and properties; gradlew is Gradle's current script, which runs the jar with -jar.

Review by commit: the first is a Spotless reformat of GradleWrapperGeneratorTask.kt only.

Tested: :app:assembleV8Debug and spotlessCheck pass, and the APK carries assets/data/common/gradle-wrapper.zip; the zipped gradlew starts Gradle 9.6.1. With Gradle 9.6.1 and AGP 9.3.1 switched in locally, build-logic compiles. Not run: the signing-key download, which needs CI secrets.

Changes that Gradle 9.6.1 and AGP 9.3.1 need, made so they also work on
the current Gradle 8.14.4 and AGP 8.8.2:

- settings.gradle.kts no longer includes :compose-preview, whose
  directory went away when it moved into a plugin. Gradle 9 refuses to
  configure a project without a directory.
- SigningKeyUtils runs the key download through providers.exec;
  Project.exec is gone in Gradle 9.
- AndroidModuleConf sets lint and packaging through properties. AGP 9's
  CommonExtension has no lint {} or packaging {} blocks.
- gradle-wrapper.zip is built from Gradle's public Wrapper task instead
  of IDEWrapperGenerator and GradleVersionResolver, a copy of Gradle's
  wrapper task built on internals that changed in Gradle 9. The zip has
  the same jar and properties as before; gradlew is Gradle's current
  script, which runs the wrapper jar with -jar.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@Daniel-ADFA
Daniel-ADFA changed the base branch from stage to feat/ADFA-6400-build-toolchain November 16, 2026 19:11
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