Skip to content

build(android): upgrade to Gradle 9.7.1 and AGP 9.4.1 - #831

Merged
farfromrefug merged 2 commits into
mainfrom
build/gradle-9
Nov 6, 2026
Merged

farfromrefug merged 2 commits into
mainfrom
build/gradle-9

Conversation

@farfromrefug

Copy link
Copy Markdown
Collaborator

Summary

  • Gradle 9.7.1, AGP 9.4.1 and androidx baselineprofile plugin 1.5.0, for both documentscanner and cardwallet. Gradle 9.6+ removed the internal APIs AGP 8.x relies on, so 9.7.1 requires AGP 9. Mirrors the oss-weather upgrade.
  • android.newDsl=false: app.gradle still uses applicationVariants, which the AGP 9 DSL removes (temporary opt-out, gone in AGP 10).
  • The gradle.properties merge hook now runs before-prepareNativeApp, so it is in place before Gradle first runs.
  • Dropped the kotlin-android plugin (AGP 9 has built-in Kotlin), including in plugin-nativeprocessor/platforms/android/include.gradle, and the removed kotlinOptions. Project.exec replaced by ExecOperations. Gradle build cache enabled.

Testing

  • ./gradlew assembleDebug on Gradle 9.7.1 passes for documentscanner, createProguard included.
  • Not verified: cardwallet, release builds, the plugin-nativeprocessor/src-native standalone aar build (own AGP 8.2.2 setup, untouched).
  • ns build android currently fails in webpack with TS2614 (Item not exported from MainList.svelte), unrelated to this change, so a full CLI build and an on-device run are still needed. Likely requires the matching nativescript-cli vendor script fixes (fix(android): make vendored gradle scripts work with Gradle 9.x and AGP 9 Akylas/nativescript-cli#9).
  • The branch also carries the local-only chore: sub commit (tools submodule bump) that was ahead of origin/main.

🤖 Generated with Claude Code

farfromrefug and others added 2 commits November 6, 2026 14:45
Gradle 9.6+ removed the internal APIs AGP 8.x relies on, so 9.7.1
requires AGP 9. Mirrors the oss-weather upgrade.

- Gradle 9.7.1, AGP 9.4.1, androidx baselineprofile plugin 1.5.0
- android.newDsl=false: app.gradle still uses applicationVariants,
  which the AGP 9 DSL removes (temporary opt-out, gone in AGP 10)
- run the gradle.properties merge hook before prepareNativeApp
- drop the kotlin-android plugin (AGP 9 built-in Kotlin), including
  in the nativeprocessor include.gradle, and the removed kotlinOptions
- replace Project.exec with ExecOperations
- enable the Gradle build cache

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug merged commit 66a6cc7 into main Nov 6, 2026
@farfromrefug
farfromrefug deleted the build/gradle-9 branch November 6, 2026 14:01
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