Skip to content

chore(examples): migrate example apps to the current Android Gradle setup - #732

Merged
Mastersam07 merged 2 commits into
mainfrom
chore/examples-android-gradle
Oct 21, 2026
Merged

Mastersam07 merged 2 commits into
mainfrom
chore/examples-android-gradle

Conversation

@Mastersam07

Copy link
Copy Markdown

Description

The database, firestore, localizations, oauth and storage examples were still on Flutter's legacy Android template (buildscript { classpath ... } plus apply 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, so flutter run on Android failed for all five. CI didn't catch it because it only builds tests natively.

  • Five legacy examples: moved to the declarative plugins {} template used by tests/android. Namespace, application ID and google-services usage are unchanged. minSdkVersion now follows flutter.minSdkVersion, which is 24. The redundant kotlin-stdlib dependency is dropped.
  • firebase_ui_auth example and tests: already on the new template, bumped to the same versions.
  • Everywhere: AGP 8.11.1, Kotlin 2.3.0, Gradle 8.14.3. The Flutter migrator also added its android.builtInKotlin / android.newDsl opt-outs.

Independent of #731. They overlap only on the tests/android version bump, which is identical in both.

Verification

flutter build apk --debug passes locally (Flutter 3.47.6) for all six examples.

Breaking Change

  • No, this is not a breaking change. It only touches example apps and test tooling.

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

@gemini-code-assist gemini-code-assist Bot 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.

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.

Comment thread packages/firebase_ui_database/example/android/app/build.gradle Outdated
Comment thread packages/firebase_ui_firestore/example/android/app/build.gradle Outdated
Comment thread packages/firebase_ui_localizations/example/android/app/build.gradle Outdated
Comment thread packages/firebase_ui_oauth/example/android/app/build.gradle Outdated
Comment thread packages/firebase_ui_storage/example/android/app/build.gradle Outdated

@demolaf demolaf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Mastersam07
Mastersam07 merged commit 1cb7926 into main Oct 21, 2026
18 checks passed
@Mastersam07
Mastersam07 deleted the chore/examples-android-gradle branch October 21, 2026 12:31
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