Skip to content

Update Android toolchain to AGP 9.2.0 / Gradle 9.5.1 / Kotlin 2.3.21#501

Merged
n13 merged 1 commit into
mainfrom
android_update_gradle
May 27, 2026
Merged

Update Android toolchain to AGP 9.2.0 / Gradle 9.5.1 / Kotlin 2.3.21#501
n13 merged 1 commit into
mainfrom
android_update_gradle

Conversation

@n13
Copy link
Copy Markdown
Collaborator

@n13 n13 commented May 27, 2026

Summary

Upgrades the Android build to the latest stable toolchain versions and fixes the Gradle 9 incompatibility in the Cargokit Rust integration.

Upgraded versions

Tool Before After
Gradle 8.13 9.5.1
Android Gradle Plugin 8.13.2 9.2.0
Kotlin Gradle Plugin 2.2.0 2.3.21
Google Services plugin 4.3.15 4.4.4

Fixes

  • Cargokit Gradle 9 compatibility (quantus_sdk/rust_builder/cargokit/gradle/plugin.gradle): Gradle 9 removed Project.exec, which the Cargokit plugin relied on, causing builds to fail with Could not find method exec() for arguments [...] on project ':rust_lib_quantus_wallet'. Migrated CargoKitBuildTask to use the injected ExecOperations service (the official replacement per Gradle 9 upgrade guide).
  • Google Services plugin bump to 4.4.4: required for AGP 9.x compatibility (older versions referenced the now-removed applicationVariants API).
  • gradle.properties tweaks: added several android.* flags surfaced by the AGP migrator.

Known follow-ups (not in this PR)

  • Built-in Kotlin migration is deferred: Flutter 3.44's own Gradle plugin doesn't yet support android.newDsl=true, and many third-party Flutter plugins (flutter_timezone, local_auth_android, mobile_scanner, play_install_referrer, share_plus, shared_preferences_android, telemetrydecksdk, app_links, ...) still apply the legacy kotlin-android plugin. The Flutter team explicitly recommends keeping builtInKotlin=false and newDsl=false until those migrate. The "future Flutter" warnings during build are informational and not fatal.

Test plan

  • flutter build apk succeeds (verified: Built build/app/outputs/flutter-apk/app-release.apk (94.3MB) in ~93s)
  • Smoke-test the release APK on a physical Android device
  • Verify the Rust bridge (rust_lib_quantus_wallet) still works at runtime (key signing, wormhole, etc.)
  • Confirm Firebase / FCM still wires up correctly with google-services 4.4.4

Notes

We get the following warnings on flutter builds - but "fixing" them causes actual build errors, so this is just flutter being a little bit retarded...

WARNING: Your Android app project: app located at: /Users/elohim/play/quantus-network/quantus-apps/mobile-app/android/app/build.gradle
applies the Kotlin Gradle Plugin, which will cause build failures in future versions of Flutter. 
Please migrate your app to Built-in Kotlin using this guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers

WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): flutter_timezone, local_auth_android, mobile_scanner, play_install_referrer, share_plus, shared_preferences_android, telemetrydecksdk
Future versions of Flutter will fail to build if your app uses plugins that apply KGP.

Please check the changelogs of these plugins and upgrade to a version that supports Built-in Kotlin.
If no such version exists, report the issue to the plugin. If necessary, here is a guide on filing 
an issue against a plugin: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers#report-incompatible-kotlin-gradle-plugin-usage-to-plugin-authors

Copy link
Copy Markdown
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

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

GTG!

That warning is concerning though.

@n13 n13 merged commit dbf22c3 into main May 27, 2026
2 checks passed
@n13
Copy link
Copy Markdown
Collaborator Author

n13 commented May 27, 2026

GTG!

That warning is concerning though.

Tried to fix it which then broke the build ... we can fix this once flutter actually doesn't allow this anymore by that time hopefully they've also fixed the kinks and all the packages have been updated

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