build: upgrade toolchain to AGP 9.4.0 / Kotlin 2.4.10 / Gradle 9.7.1 - #16
Closed
ZL114514 wants to merge 1 commit into
Closed
build: upgrade toolchain to AGP 9.4.0 / Kotlin 2.4.10 / Gradle 9.7.1 #16ZL114514 wants to merge 1 commit into
ZL114514 wants to merge 1 commit into
Conversation
- bump AGP 8.13.2 to 9.4.0 (AGP 8.x relies on a Gradle internal API removed in 9.6, incompatible with the 9.7.1 wrapper) - bump Kotlin 2.2.21 to 2.4.10, KSP 2.3.0 to 2.3.11, Hilt 2.57.2 to 2.60.1, Compose BOM 2025.10.01 to 2026.08.00 - compileSdk 36 -> 37 (required by Compose BOM 2026.08); targetSdk and minSdk unchanged - AGP 9 built-in Kotlin: remove org.jetbrains.kotlin.android plugin, move jvmTarget into android.kotlin.compilerOptions - pass resolved File to SourceSet assets (AGP 9 rejects Provider) - wrapper: Gradle 9.7.1 with official sha256 - regenerate dependency-verification metadata (sha256 mode) Verified: assembleDebug/assembleDebugAndroidTest/testDebugUnitTest all green with dependency verification enabled; debug APK installed on device dcd14b87 and functional test passed (login normal).
There was a problem hiding this comment.
🟡 Changes recommended
Dependency verification metadata appears incomplete for non-Windows platforms (notably aapt2), which can break verified builds/CI.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Upgrades the Android build toolchain to keep the project compatible with newer Gradle versions by moving to AGP 9.4.0 / Kotlin 2.4.10 / Gradle 9.7.1, and adjusts module/build configuration to match AGP 9 requirements.
Changes:
- Bump Gradle wrapper to 9.7.1 (with sha256) and refresh dependency verification metadata (schema 1.4).
- Update version catalog/tooling versions (AGP, Kotlin, Hilt, KSP, Compose BOM) and raise
compileSdkto 37. - Update app Gradle config for AGP 9 Kotlin/compiler options and asset SourceSet API changes.
File summaries
| File | Description |
|---|---|
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper URL and SHA to 9.7.1. |
| gradle/verification-metadata.xml | Regenerates dependency verification metadata and bumps schema version. |
| gradle/libs.versions.toml | Bumps toolchain/library versions (AGP/Kotlin/Compose/Hilt/KSP) in the version catalog. |
| build.gradle.kts | Updates top-level plugin versions (Hilt/KSP) for the new toolchain. |
| app/build.gradle.kts | Aligns Android module config with AGP 9/Kotlin 2.4 (compiler options, SourceSet assets). |
Review details
- Files reviewed: 3/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+2370
to
+2376
| <component group="com.android.tools.build" name="aapt2" version="9.4.0-15978811"> | ||
| <artifact name="aapt2-9.4.0-15978811-windows.jar"> | ||
| <sha256 value="5fe3c8ee5c6b3f47efd1fced1d6418084037f54f13290816c5db717e6b5c92aa" origin="Generated by Gradle"/> | ||
| </artifact> | ||
| <artifact name="aapt2-9.4.0-15978811.pom"> | ||
| <sha256 value="5d3820b1ddbbc1dae97aab61cce5cbcb81221dec3e0b71f692e86056502baf14" origin="Generated by Gradle"/> | ||
| </artifact> |
Comment on lines
84
to
88
| [plugins] | ||
| android-application = { id = "com.android.application", version.ref = "agp" } | ||
| kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
| kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } | ||
| kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } | ||
| kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } |
Collaborator
|
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.
Verified: assembleDebug/assembleDebugAndroidTest/testDebugUnitTest all green with dependency verification enabled; debug APK installed on device dcd14b87 and functional test passed (login normal).
被gradle气晕,故升级至最新最热依赖(官网分发的版本甚至没签名,不能正常使用