Repository navigation
chore(examples): migrate example apps to the current Android Gradle setup - #732
Merged
Merged
Conversation
…etup
The database, firestore, localizations, oauth and storage examples still used the legacy buildscript/apply template with AGP 7.4.2, which current Flutter no longer builds. Move them to the declarative plugins {} template used by tests/android.
All examples and tests now use AGP 8.11.1, Kotlin 2.3.0 and Gradle 8.14.3, the minimums Flutter stable enforces.
There was a problem hiding this comment.
Code Review
This pull request modernizes the Android build configurations across multiple example packages by upgrading Gradle, Kotlin, and Android Gradle Plugin versions, and updating source/target compatibility to Java 11. The review feedback recommends explicitly setting jvmTarget to the string literal "11" rather than using the JavaVersion enum, which avoids fragile implicit type coercion and ensures compatibility with Kotlin DSL.
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.
Description
The database, firestore, localizations, oauth and storage examples were still on Flutter's legacy Android template (
buildscript { classpath ... }plusapply from: flutter.gradle, AGP 7.4.2, Gradle 8.0). Current Flutter stable removed that hook and enforces AGP ≥ 8.11.1 and Gradle ≥ 8.14, soflutter runon Android failed for all five. CI didn't catch it because it only buildstestsnatively.plugins {}template used bytests/android. Namespace, application ID and google-services usage are unchanged.minSdkVersionnow followsflutter.minSdkVersion, which is 24. The redundantkotlin-stdlibdependency is dropped.firebase_ui_authexample andtests: already on the new template, bumped to the same versions.android.builtInKotlin/android.newDslopt-outs.Independent of #731. They overlap only on the
tests/androidversion bump, which is identical in both.Verification
flutter build apk --debugpasses locally (Flutter 3.47.6) for all six examples.Breaking Change