From 33e6d412215a8c558b923f7a282ef9ffdfa8bf75 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 30 Sep 2025 12:25:11 +0100 Subject: [PATCH 1/4] fix: bump FlutterFire dependencies --- packages/firebase_ui_auth/example/pubspec.yaml | 4 ++-- packages/firebase_ui_auth/pubspec.yaml | 4 ++-- packages/firebase_ui_database/example/pubspec.yaml | 4 ++-- packages/firebase_ui_database/pubspec.yaml | 2 +- packages/firebase_ui_firestore/example/pubspec.yaml | 4 ++-- packages/firebase_ui_firestore/pubspec.yaml | 2 +- packages/firebase_ui_localizations/example/pubspec.yaml | 2 +- packages/firebase_ui_oauth/example/pubspec.yaml | 4 ++-- packages/firebase_ui_oauth/pubspec.yaml | 2 +- packages/firebase_ui_oauth_apple/pubspec.yaml | 2 +- packages/firebase_ui_oauth_facebook/pubspec.yaml | 2 +- packages/firebase_ui_oauth_google/pubspec.yaml | 2 +- packages/firebase_ui_oauth_twitter/pubspec.yaml | 2 +- packages/firebase_ui_storage/example/pubspec.yaml | 4 ++-- packages/firebase_ui_storage/pubspec.yaml | 2 +- tests/ios/Podfile | 2 +- tests/macos/Podfile | 2 +- tests/pubspec.yaml | 8 ++++---- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/firebase_ui_auth/example/pubspec.yaml b/packages/firebase_ui_auth/example/pubspec.yaml index e313d41c..6817eee1 100644 --- a/packages/firebase_ui_auth/example/pubspec.yaml +++ b/packages/firebase_ui_auth/example/pubspec.yaml @@ -22,8 +22,8 @@ environment: dependencies: cupertino_icons: ^1.0.6 - firebase_auth: ^6.0.0 - firebase_core: ^4.0.0 + firebase_auth: ^6.1.0 + firebase_core: ^4.1.1 flutter: sdk: flutter flutter_localizations: diff --git a/packages/firebase_ui_auth/pubspec.yaml b/packages/firebase_ui_auth/pubspec.yaml index d3aaaef4..f15816ed 100644 --- a/packages/firebase_ui_auth/pubspec.yaml +++ b/packages/firebase_ui_auth/pubspec.yaml @@ -11,8 +11,8 @@ environment: dependencies: app_links: ^6.4.0 email_validator: ^2.1.17 - firebase_auth: ^6.0.0 - firebase_core: ^4.0.0 + firebase_auth: ^6.1.0 + firebase_core: ^4.1.1 firebase_ui_localizations: ^2.0.0 firebase_ui_oauth: ^2.0.0 firebase_ui_shared: ^1.4.1 diff --git a/packages/firebase_ui_database/example/pubspec.yaml b/packages/firebase_ui_database/example/pubspec.yaml index 9455f747..f63e1904 100644 --- a/packages/firebase_ui_database/example/pubspec.yaml +++ b/packages/firebase_ui_database/example/pubspec.yaml @@ -33,8 +33,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 - firebase_core: ^4.0.0 - firebase_database: ^12.0.0 + firebase_core: ^4.1.1 + firebase_database: ^12.0.2 dev_dependencies: drive: ^1.0.0-1.0.nullsafety.5 flutter_test: diff --git a/packages/firebase_ui_database/pubspec.yaml b/packages/firebase_ui_database/pubspec.yaml index d48f80e3..35ea6cea 100644 --- a/packages/firebase_ui_database/pubspec.yaml +++ b/packages/firebase_ui_database/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: collection: ^1.18.0 - firebase_database: ^12.0.0 + firebase_database: ^12.0.2 firebase_ui_localizations: ^2.0.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_firestore/example/pubspec.yaml b/packages/firebase_ui_firestore/example/pubspec.yaml index 0c5b983a..7d246796 100644 --- a/packages/firebase_ui_firestore/example/pubspec.yaml +++ b/packages/firebase_ui_firestore/example/pubspec.yaml @@ -30,9 +30,9 @@ dependencies: flutter: sdk: flutter firebase_ui_firestore: ^2.0.0 - cloud_firestore: ^6.0.0 + cloud_firestore: ^6.0.2 cupertino_icons: ^1.0.6 - firebase_core: ^4.0.0 + firebase_core: ^4.1.1 dev_dependencies: drive: ^1.0.0-1.0.nullsafety.5 flutter_test: diff --git a/packages/firebase_ui_firestore/pubspec.yaml b/packages/firebase_ui_firestore/pubspec.yaml index ad24fca3..31d424c2 100644 --- a/packages/firebase_ui_firestore/pubspec.yaml +++ b/packages/firebase_ui_firestore/pubspec.yaml @@ -8,7 +8,7 @@ environment: flutter: ">=3.3.0" dependencies: - cloud_firestore: ^6.0.0 + cloud_firestore: ^6.0.2 firebase_ui_localizations: ^2.0.0 firebase_ui_shared: ^1.4.1 flutter: diff --git a/packages/firebase_ui_localizations/example/pubspec.yaml b/packages/firebase_ui_localizations/example/pubspec.yaml index c9c78036..87e0ca59 100644 --- a/packages/firebase_ui_localizations/example/pubspec.yaml +++ b/packages/firebase_ui_localizations/example/pubspec.yaml @@ -31,7 +31,7 @@ environment: dependencies: cupertino_icons: ^1.0.6 - firebase_core: ^4.0.0 + firebase_core: ^4.1.1 firebase_ui_auth: ^3.0.0 firebase_ui_localizations: ^2.0.0 flutter: diff --git a/packages/firebase_ui_oauth/example/pubspec.yaml b/packages/firebase_ui_oauth/example/pubspec.yaml index cb556267..493334ba 100644 --- a/packages/firebase_ui_oauth/example/pubspec.yaml +++ b/packages/firebase_ui_oauth/example/pubspec.yaml @@ -33,8 +33,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 - firebase_auth: ^6.0.0 - firebase_core: ^4.0.0 + firebase_auth: ^6.1.0 + firebase_core: ^4.1.1 firebase_ui_oauth: ^2.0.0 firebase_ui_oauth_apple: ^2.0.0 firebase_ui_oauth_facebook: ^2.0.0 diff --git a/packages/firebase_ui_oauth/pubspec.yaml b/packages/firebase_ui_oauth/pubspec.yaml index 07209ed5..c1913b15 100644 --- a/packages/firebase_ui_oauth/pubspec.yaml +++ b/packages/firebase_ui_oauth/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: desktop_webview_auth: ^0.0.14 - firebase_auth: ^6.0.0 + firebase_auth: ^6.1.0 firebase_ui_auth: ^3.0.0 firebase_ui_shared: ^1.4.1 flutter_svg: ^2.0.9 diff --git a/packages/firebase_ui_oauth_apple/pubspec.yaml b/packages/firebase_ui_oauth_apple/pubspec.yaml index b2c84052..9352651e 100644 --- a/packages/firebase_ui_oauth_apple/pubspec.yaml +++ b/packages/firebase_ui_oauth_apple/pubspec.yaml @@ -8,7 +8,7 @@ environment: flutter: ">=3.3.0" dependencies: - firebase_auth: ^6.0.0 + firebase_auth: ^6.1.0 firebase_ui_oauth: ^2.0.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_facebook/pubspec.yaml b/packages/firebase_ui_oauth_facebook/pubspec.yaml index 06984c8b..1635553e 100644 --- a/packages/firebase_ui_oauth_facebook/pubspec.yaml +++ b/packages/firebase_ui_oauth_facebook/pubspec.yaml @@ -8,7 +8,7 @@ environment: flutter: ">=3.3.0" dependencies: - firebase_auth: ^6.0.0 + firebase_auth: ^6.1.0 firebase_ui_oauth: ^2.0.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_google/pubspec.yaml b/packages/firebase_ui_oauth_google/pubspec.yaml index 31c4de0b..9df60e88 100644 --- a/packages/firebase_ui_oauth_google/pubspec.yaml +++ b/packages/firebase_ui_oauth_google/pubspec.yaml @@ -8,7 +8,7 @@ environment: flutter: ">=3.3.0" dependencies: - firebase_auth: ^6.0.0 + firebase_auth: ^6.1.0 firebase_ui_oauth: ^2.0.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_twitter/pubspec.yaml b/packages/firebase_ui_oauth_twitter/pubspec.yaml index e28b908d..73955dac 100644 --- a/packages/firebase_ui_oauth_twitter/pubspec.yaml +++ b/packages/firebase_ui_oauth_twitter/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - firebase_auth: ^6.0.0 + firebase_auth: ^6.1.0 firebase_ui_oauth: ^2.0.0 twitter_login: ^4.4.2 diff --git a/packages/firebase_ui_storage/example/pubspec.yaml b/packages/firebase_ui_storage/example/pubspec.yaml index 3908e024..b0bc218d 100644 --- a/packages/firebase_ui_storage/example/pubspec.yaml +++ b/packages/firebase_ui_storage/example/pubspec.yaml @@ -9,8 +9,8 @@ environment: dependencies: cupertino_icons: ^1.0.6 file_picker: ^6.1.1 - firebase_core: ^4.0.0 - firebase_storage: ^13.0.0 + firebase_core: ^4.1.1 + firebase_storage: ^13.0.2 firebase_ui_storage: ^3.0.0 firebase_ui_shared: ^1.4.1 diff --git a/packages/firebase_ui_storage/pubspec.yaml b/packages/firebase_ui_storage/pubspec.yaml index c16b6491..95c351fa 100644 --- a/packages/firebase_ui_storage/pubspec.yaml +++ b/packages/firebase_ui_storage/pubspec.yaml @@ -13,7 +13,7 @@ false_secrets: dependencies: flutter: sdk: flutter - firebase_storage: ^13.0.0 + firebase_storage: ^13.0.2 firebase_ui_localizations: ^2.0.0 firebase_ui_shared: ^1.4.1 path: ^1.8.3 diff --git a/tests/ios/Podfile b/tests/ios/Podfile index 7894e409..6f296fda 100644 --- a/tests/ios/Podfile +++ b/tests/ios/Podfile @@ -29,7 +29,7 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! use_modular_headers! - pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '12.0.0' + pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '12.2.0' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/tests/macos/Podfile b/tests/macos/Podfile index 8c08cf5f..4fb10dd5 100644 --- a/tests/macos/Podfile +++ b/tests/macos/Podfile @@ -30,7 +30,7 @@ target 'Runner' do use_frameworks! use_modular_headers! - pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '12.0.0' + pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '12.2.0' flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/tests/pubspec.yaml b/tests/pubspec.yaml index 82451def..5ba0a210 100644 --- a/tests/pubspec.yaml +++ b/tests/pubspec.yaml @@ -10,8 +10,8 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.6 - firebase_auth: ^6.0.0 - firebase_core: ^4.0.0 + firebase_auth: ^6.1.0 + firebase_core: ^4.1.1 firebase_ui_auth: ^3.0.0 firebase_ui_localizations: ^2.0.0 firebase_ui_oauth_apple: ^2.0.0 @@ -21,12 +21,12 @@ dependencies: flutter_facebook_auth: ^6.0.3 twitter_login: ^4.4.2 firebase_ui_oauth_twitter: ^2.0.0 - cloud_firestore: ^6.0.0 + cloud_firestore: ^6.0.2 firebase_ui_firestore: ^2.0.0 http: ^1.1.2 google_sign_in: ^6.2.1 firebase_ui_shared: ^1.4.1 - firebase_database: ^12.0.0 + firebase_database: ^12.0.2 firebase_ui_database: ^2.0.0 dev_dependencies: From 46ba5e412411096e5fd8a685b786101877def75d Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 30 Sep 2025 13:29:26 +0100 Subject: [PATCH 2/4] ci: fix android build gradle settings --- tests/android/app/build.gradle | 12 ++++++------ tests/android/gradle.properties | 4 ++-- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- tests/android/settings.gradle | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/android/app/build.gradle b/tests/android/app/build.gradle index 17467309..326533d2 100644 --- a/tests/android/app/build.gradle +++ b/tests/android/app/build.gradle @@ -9,16 +9,16 @@ plugins { android { namespace = "io.flutter.plugins.firebase.tests" // use "flutter.compileSdkVersion" and bump AGP once twitter_login has released v4.4.3: https://github.com/0maru/twitter_login/issues/139 - compileSdkVersion 34 + compileSdk 36 ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_11 } defaultConfig { @@ -26,7 +26,7 @@ android { applicationId = "io.flutter.plugins.firebase.tests" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = 23 + minSdkVersion = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName @@ -43,4 +43,4 @@ android { flutter { source = "../.." -} \ No newline at end of file +} diff --git a/tests/android/gradle.properties b/tests/android/gradle.properties index 94adc3a3..bfb7805f 100644 --- a/tests/android/gradle.properties +++ b/tests/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4G android.useAndroidX=true -android.enableJetifier=true +android.enableJetifier=false diff --git a/tests/android/gradle/wrapper/gradle-wrapper.properties b/tests/android/gradle/wrapper/gradle-wrapper.properties index 3c472b99..6cb8454c 100644 --- a/tests/android/gradle/wrapper/gradle-wrapper.properties +++ b/tests/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip diff --git a/tests/android/settings.gradle b/tests/android/settings.gradle index c0dcfa11..45f4c66d 100644 --- a/tests/android/settings.gradle +++ b/tests/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.application" version "8.7.3" apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false id "com.google.gms.google-services" version "4.4.2" apply false } From 96086b1677e55a29a5507279377d5462ab46fcea Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 30 Sep 2025 14:11:06 +0100 Subject: [PATCH 3/4] ci: write namespace for CI --- .github/workflows/e2e.yml | 3 +++ scripts/patch-twitter-login.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 scripts/patch-twitter-login.sh diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ff1a74de..41da251b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -70,6 +70,9 @@ jobs: melos-version: "3.0.1" - name: "Bootstrap package" run: melos bootstrap --scope tests + # needed because twitter_login plugin doesn't have a namespace defined and he hasn't released a new version yet: https://github.com/0maru/twitter_login/issues/139 + - name: Patch twitter_login plugin + run: ./scripts/patch-twitter-login.sh - name: Start Firebase Emulator run: | cd functions/ diff --git a/scripts/patch-twitter-login.sh b/scripts/patch-twitter-login.sh new file mode 100755 index 00000000..d2ba726c --- /dev/null +++ b/scripts/patch-twitter-login.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -e + +# Script to patch twitter_login plugin to add namespace for AGP 8.x compatibility +# This is required because twitter_login 4.4.2 doesn't have a namespace defined + +echo "Patching twitter_login plugin for AGP 8.x compatibility..." + +# Find the twitter_login plugin build.gradle file (not the example one) +TWITTER_LOGIN_BUILD_GRADLE=$(find ~/.pub-cache/hosted/pub.dev/twitter_login-* -name "build.gradle" -path "*/android/build.gradle" ! -path "*/example/*" 2>/dev/null | head -n 1) + +if [ -z "$TWITTER_LOGIN_BUILD_GRADLE" ]; then + echo "Error: Could not find twitter_login build.gradle file" + exit 1 +fi + +echo "Found twitter_login build.gradle at: $TWITTER_LOGIN_BUILD_GRADLE" + +# Check if namespace is already present +if grep -q "namespace" "$TWITTER_LOGIN_BUILD_GRADLE"; then + echo "Namespace already present in twitter_login build.gradle, skipping patch" + exit 0 +fi + +# Add namespace to android block +sed -i.bak '/^android {$/a\ + namespace '\''com.maru.twitter_login'\'' +' "$TWITTER_LOGIN_BUILD_GRADLE" + +echo "Successfully patched twitter_login build.gradle with namespace" From bdf374dbc73b56157b1a5880bec6a431ac3ff305 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 30 Sep 2025 14:20:08 +0100 Subject: [PATCH 4/4] ci: fix twitter script --- scripts/patch-twitter-login.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/patch-twitter-login.sh b/scripts/patch-twitter-login.sh index d2ba726c..3acb2c79 100755 --- a/scripts/patch-twitter-login.sh +++ b/scripts/patch-twitter-login.sh @@ -6,11 +6,25 @@ set -e echo "Patching twitter_login plugin for AGP 8.x compatibility..." +# Determine pub cache directory (supports both local and CI environments) +if [ -n "$PUB_CACHE" ]; then + PUB_CACHE_DIR="$PUB_CACHE" +elif [ -n "$FLUTTER_ROOT" ]; then + PUB_CACHE_DIR="$FLUTTER_ROOT/.pub-cache" +else + PUB_CACHE_DIR="$HOME/.pub-cache" +fi + +echo "Using pub cache directory: $PUB_CACHE_DIR" + # Find the twitter_login plugin build.gradle file (not the example one) -TWITTER_LOGIN_BUILD_GRADLE=$(find ~/.pub-cache/hosted/pub.dev/twitter_login-* -name "build.gradle" -path "*/android/build.gradle" ! -path "*/example/*" 2>/dev/null | head -n 1) +TWITTER_LOGIN_BUILD_GRADLE=$(find "$PUB_CACHE_DIR/hosted" -name "build.gradle" -path "*/twitter_login-*/android/build.gradle" ! -path "*/example/*" 2>/dev/null | head -n 1) if [ -z "$TWITTER_LOGIN_BUILD_GRADLE" ]; then echo "Error: Could not find twitter_login build.gradle file" + echo "Searched in: $PUB_CACHE_DIR/hosted" + echo "Available twitter_login directories:" + find "$PUB_CACHE_DIR/hosted" -type d -name "twitter_login-*" 2>/dev/null || echo "None found" exit 1 fi @@ -23,8 +37,15 @@ if grep -q "namespace" "$TWITTER_LOGIN_BUILD_GRADLE"; then fi # Add namespace to android block -sed -i.bak '/^android {$/a\ +# Use different sed syntax for macOS vs Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS + sed -i.bak '/^android {$/a\ namespace '\''com.maru.twitter_login'\'' ' "$TWITTER_LOGIN_BUILD_GRADLE" +else + # Linux + sed -i '/^android {$/a\ namespace '\''com.maru.twitter_login'\''' "$TWITTER_LOGIN_BUILD_GRADLE" +fi echo "Successfully patched twitter_login build.gradle with namespace"