Skip to content

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
OpenAHU:masterfrom
ZL114514:p/ZL114514/feat/upgrade-build-toolchain
Closed

build: upgrade toolchain to AGP 9.4.0 / Kotlin 2.4.10 / Gradle 9.7.1 #16
ZL114514 wants to merge 1 commit into
OpenAHU:masterfrom
ZL114514:p/ZL114514/feat/upgrade-build-toolchain

Conversation

@ZL114514

@ZL114514 ZL114514 commented Sep 5, 2026

Copy link
Copy Markdown
  • 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).

被gradle气晕,故升级至最新最热依赖(官网分发的版本甚至没签名,不能正常使用

- 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).

Copilot AI 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.

🟡 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 compileSdk to 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 thread gradle/libs.versions.toml
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" }
@MuxYang

MuxYang commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator
  • 由官网 openahu.org 分发的apk文件 ( SHA-1: 34dcfc1a8828d27a35d71a8e56b151e5baa425df ) 签名验证如下:
Verifies
Verified using v1 scheme (JAR signing): false
Verified using v2 scheme (APK Signature Scheme v2): true
Verified using v3 scheme (APK Signature Scheme v3): true
Verified using v3.1 scheme (APK Signature Scheme v3.1): false
Verified using v4 scheme (APK Signature Scheme v4): false
Verified for SourceStamp: false
Number of signers: 1
Signer #1 certificate DN: O=OpenAHU, CN=OpenAHU
Signer #1 certificate SHA-256 digest: faac0181390b21609c45794e77d5448048683090eeb9ddf29ae41ed89a08456e
Signer #1 certificate SHA-1 digest: 879fdd79ffa26c9707d01ba496e082624e0292e3
Signer #1 certificate MD5 digest: 00fa8c514e15dda03fcbf1973213185a
Signer #1 key algorithm: RSA
Signer #1 key size (bits): 2048
Signer #1 public key SHA-256 digest: 93f648c146aae1718ac372df8b5e733431fa091d292073d718ebe4547e4f9965
Signer #1 public key SHA-1 digest: b67fb7b47c112e44fdddbe8d17f8266e9008c075
Signer #1 public key MD5 digest: 6c43e53dba746db0f02008dbce694e98
  • 目前无更新构建工具链的必要

@MuxYang MuxYang closed this Sep 5, 2026
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.

3 participants