Skip to content

ci(android): upgrade example app to AGP 9 for Flutter 3.50 - #473

Merged
mosuem merged 1 commit into
google:masterfrom
mosuem:fix/android-agp9
Nov 17, 2026
Merged

mosuem merged 1 commit into
google:masterfrom
mosuem:fix/android-agp9

Conversation

@mosuem

@mosuem mosuem commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Note

This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.

The Android emulator job is failing on master (run) since subosito/flutter-action picked up Flutter stable 3.50.0:

Build file '.../example/webcrypto_demo_flutter_app/android/build.gradle.kts' line: 19
> 'com.android.build.api.dsl.ApplicationDefaultConfig com.android.build.api.dsl.ApplicationExtension.getDefaultConfig()'

Flutter 3.50's Gradle plugin is built against AGP 9, but the example app pins AGP 8.11.1, so the plugin hits a NoSuchMethodError.

This PR updates example/webcrypto_demo_flutter_app/android to match the Flutter 3.50.0 app templates:

  • Gradle 8.14 → 9.5.0
  • AGP 8.11.1 → 9.3.1
  • KGP 2.2.20 → 2.4.20
  • Replace the removed android.kotlinOptions with kotlin { compilerOptions { ... } }
  • Add android.newDsl=false / android.builtInKotlin=false to gradle.properties, as the template does

Draft: I only checked this against the Flutter templates, not with a local build. CI on this PR will be the real test.

Flutter stable 3.50.0's Gradle plugin is compiled against AGP 9 and fails
with NoSuchMethodError on ApplicationExtension.getDefaultConfig() when the
app uses AGP 8.11.1. Align the example app with the Flutter 3.50 templates:
Gradle 9.5.0, AGP 9.3.1, KGP 2.4.20, kotlin.compilerOptions.
@mosuem
mosuem marked this pull request as ready for review November 17, 2026 13:33
@mosuem
mosuem requested a review from jonasfj November 17, 2026 13:35
mosuem added a commit to mosuem/webcrypto.dart that referenced this pull request Nov 17, 2026
Stack on google#473 to fix the Android emulator job with Flutter 3.50.
@mosuem
mosuem merged commit 0fa20bd into google:master Nov 17, 2026
16 checks passed
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