diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a4f6cca5..62d4d844 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -168,16 +168,16 @@ jobs: npm i npm run build ../scripts/start-firebase-emulator.sh + - uses: futureware-tech/simulator-action@bde6805eedaeaba7775a9959970edc7d8bf10c4d + id: simulator + with: + # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators + model: "iPhone 15" - name: "E2E Tests" working-directory: tests + env: + SIMULATOR: ${{ steps.simulator.outputs.udid }} run: | - # Boot simulator and wait for System app to be ready. - # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators - SIMULATOR="iPhone 14" - xcrun simctl bootstatus "$SIMULATOR" -b - xcrun simctl logverbose "$SIMULATOR" enable - # Sleep to allow simulator to settle. - sleep 15 # Uncomment following line to have simulator logs printed out for debugging purposes. # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & flutter test ./integration_test/firebase_ui_test.dart -d "$SIMULATOR" --dart-define=CI=true diff --git a/packages/firebase_ui_auth/example/pubspec.yaml b/packages/firebase_ui_auth/example/pubspec.yaml index f69992b4..b6baf3b0 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: ^5.3.2 - firebase_core: ^3.7.0 + firebase_auth: ^5.4.0 + firebase_core: ^3.10.0 flutter: sdk: flutter flutter_localizations: diff --git a/packages/firebase_ui_auth/pubspec.yaml b/packages/firebase_ui_auth/pubspec.yaml index 31660bb4..a5d56fab 100644 --- a/packages/firebase_ui_auth/pubspec.yaml +++ b/packages/firebase_ui_auth/pubspec.yaml @@ -10,9 +10,9 @@ environment: dependencies: email_validator: ^2.1.17 - firebase_auth: ^5.3.2 - firebase_core: ^3.7.0 - firebase_dynamic_links: ^6.0.9 + firebase_auth: ^5.4.0 + firebase_core: ^3.10.0 + firebase_dynamic_links: ^6.1.0 firebase_ui_localizations: ^1.13.0 firebase_ui_oauth: ^1.6.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 e497ad47..a5d52d62 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: ^3.7.0 - firebase_database: ^11.1.5 + firebase_core: ^3.10.0 + firebase_database: ^11.3.0 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 8a651e13..6b95794d 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: ^11.1.5 + firebase_database: ^11.3.0 firebase_ui_localizations: ^1.13.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_firestore/example/pubspec.yaml b/packages/firebase_ui_firestore/example/pubspec.yaml index 9d484816..9917d9e1 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: ^1.7.0 - cloud_firestore: ^5.4.5 + cloud_firestore: ^5.6.1 cupertino_icons: ^1.0.6 - firebase_core: ^3.7.0 + firebase_core: ^3.10.0 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 4b7997dd..4ee3fbea 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: ^5.4.5 + cloud_firestore: ^5.6.1 firebase_ui_localizations: ^1.13.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 42e9310a..c5a83bb0 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: ^3.7.0 + firebase_core: ^3.10.0 firebase_ui_auth: ^1.16.0 firebase_ui_localizations: ^1.13.0 flutter: diff --git a/packages/firebase_ui_oauth/example/pubspec.yaml b/packages/firebase_ui_oauth/example/pubspec.yaml index b18a6035..9ba3bf3f 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: ^5.3.2 - firebase_core: ^3.7.0 + firebase_auth: ^5.4.0 + firebase_core: ^3.10.0 firebase_ui_oauth: ^1.6.0 firebase_ui_oauth_apple: ^1.3.0 firebase_ui_oauth_facebook: ^1.3.0 diff --git a/packages/firebase_ui_oauth/pubspec.yaml b/packages/firebase_ui_oauth/pubspec.yaml index 1776c2e0..60cde5c4 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: ^5.3.2 + firebase_auth: ^5.4.0 firebase_ui_auth: ^1.16.0 firebase_ui_shared: ^1.4.1 flutter_svg: ^2.0.9 diff --git a/packages/firebase_ui_oauth/test/flutterfire_ui_oauth_test.dart b/packages/firebase_ui_oauth/test/flutterfire_ui_oauth_test.dart index bc7ac370..b80f1480 100644 --- a/packages/firebase_ui_oauth/test/flutterfire_ui_oauth_test.dart +++ b/packages/firebase_ui_oauth/test/flutterfire_ui_oauth_test.dart @@ -138,7 +138,10 @@ void main() { final expectedColor = style.backgroundColor.getValue(Brightness.dark); final containerFinder = find.byWidgetPredicate((widget) { - return widget is Material && widget.color!.value == expectedColor.value; + return widget is Material && + widget.color!.r == expectedColor.r && + widget.color!.g == expectedColor.g && + widget.color!.b == expectedColor.b; }); expect(containerFinder, findsOneWidget); @@ -150,8 +153,9 @@ void main() { final textFinder = find.byWidgetPredicate( (widget) => widget is Text && - widget.style!.color!.value == - style.color.getValue(Brightness.dark).value, + widget.style!.color!.r == style.color.getValue(Brightness.dark).r && + widget.style!.color!.g == style.color.getValue(Brightness.dark).g && + widget.style!.color!.b == style.color.getValue(Brightness.dark).b, ); expect(textFinder, findsOneWidget); diff --git a/packages/firebase_ui_oauth_apple/pubspec.yaml b/packages/firebase_ui_oauth_apple/pubspec.yaml index 45407f5e..cd9057d4 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: ^5.3.2 + firebase_auth: ^5.4.0 firebase_ui_oauth: ^1.6.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_facebook/pubspec.yaml b/packages/firebase_ui_oauth_facebook/pubspec.yaml index 0bf8e986..94f0fa09 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: ^5.3.2 + firebase_auth: ^5.4.0 firebase_ui_oauth: ^1.6.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_google/pubspec.yaml b/packages/firebase_ui_oauth_google/pubspec.yaml index 84740ca8..2869dc30 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: ^5.3.2 + firebase_auth: ^5.4.0 firebase_ui_oauth: ^1.6.0 flutter: sdk: flutter diff --git a/packages/firebase_ui_oauth_twitter/pubspec.yaml b/packages/firebase_ui_oauth_twitter/pubspec.yaml index 6d762c9f..4f0c68a0 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: ^5.3.2 + firebase_auth: ^5.4.0 firebase_ui_oauth: ^1.6.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 d889205a..23a71730 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: ^3.7.0 - firebase_storage: ^12.3.5 + firebase_core: ^3.10.0 + firebase_storage: ^12.4.0 firebase_ui_storage: ^2.1.0 firebase_ui_shared: ^1.4.1 diff --git a/packages/firebase_ui_storage/lib/src/widgets/image.dart b/packages/firebase_ui_storage/lib/src/widgets/image.dart index ac83944f..bf0b6470 100644 --- a/packages/firebase_ui_storage/lib/src/widgets/image.dart +++ b/packages/firebase_ui_storage/lib/src/widgets/image.dart @@ -438,7 +438,13 @@ class _SolidColorLoadingStateVariantPlaceholder extends StatelessWidget { return color!; } - return Theme.of(context).colorScheme.surfaceTint.withOpacity(0.12); + final themeColor = Theme.of(context).colorScheme.surfaceTint; + return themeColor.withValues( + red: themeColor.r, + green: themeColor.g, + blue: themeColor.b, + alpha: (0.12 * 255), + ); } @override @@ -588,8 +594,20 @@ class __ShimmerLoadingStateVariantPlaceholderState @override Widget build(BuildContext context) { - final a = Theme.of(context).colorScheme.surfaceTint.withOpacity(0.12); - final b = Theme.of(context).colorScheme.surfaceTint.withOpacity(0.24); + final themeColor = Theme.of(context).colorScheme.surfaceTint; + final a = themeColor.withValues( + red: themeColor.r, + green: themeColor.g, + blue: themeColor.b, + alpha: (0.12 * 255), + ); + + final b = themeColor.withValues( + red: themeColor.r, + green: themeColor.g, + blue: themeColor.b, + alpha: (0.24 * 255), + ); final (lighter, darker) = switch (Theme.of(context).brightness) { Brightness.light => (a, b), diff --git a/packages/firebase_ui_storage/pubspec.yaml b/packages/firebase_ui_storage/pubspec.yaml index ff36b9d3..5a6b2b13 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: ^12.3.5 + firebase_storage: ^12.4.0 firebase_ui_localizations: ^1.13.0 firebase_ui_shared: ^1.4.1 path: ^1.8.3 diff --git a/tests/android/app/build.gradle b/tests/android/app/build.gradle index 20c3a629..17467309 100644 --- a/tests/android/app/build.gradle +++ b/tests/android/app/build.gradle @@ -1,67 +1,46 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' + id "com.google.gms.google-services" } android { - namespace "io.flutter.plugins.firebase.tests" - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + 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 + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "io.flutter.plugins.firebase.tests" + applicationId = "io.flutter.plugins.firebase.tests" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 23 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' -} - -dependencies {} + source = "../.." +} \ No newline at end of file diff --git a/tests/android/build.gradle b/tests/android/build.gradle index 0391438f..8e9de9d8 100644 --- a/tests/android/build.gradle +++ b/tests/android/build.gradle @@ -1,19 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' - // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' - // END: FlutterFire Configuration - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -21,14 +5,14 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/tests/android/settings.gradle b/tests/android/settings.gradle index 55c4ca8b..c0dcfa11 100644 --- a/tests/android/settings.gradle +++ b/tests/android/settings.gradle @@ -5,16 +5,22 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - plugins { - id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + repositories { + google() + mavenCentral() + gradlePluginPortal() } } -include ":app" +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.google.gms.google-services" version "4.4.2" apply false +} -apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" +include ":app" \ No newline at end of file diff --git a/tests/ios/Podfile b/tests/ios/Podfile index f39af1eb..0bfe0477 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 => '11.4.0' + pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.6.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 2713a422..e7cea55a 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 => '11.4.0' + pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.6.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 5d06b745..e278d7ee 100644 --- a/tests/pubspec.yaml +++ b/tests/pubspec.yaml @@ -10,8 +10,8 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.6 - firebase_auth: ^5.3.2 - firebase_core: ^3.7.0 + firebase_auth: ^5.4.0 + firebase_core: ^3.10.0 firebase_ui_auth: ^1.16.0 firebase_ui_localizations: ^1.13.0 firebase_ui_oauth_apple: ^1.3.0 @@ -21,12 +21,12 @@ dependencies: flutter_facebook_auth: ^6.0.3 twitter_login: ^4.4.2 firebase_ui_oauth_twitter: ^1.3.0 - cloud_firestore: ^5.4.5 + cloud_firestore: ^5.6.1 firebase_ui_firestore: ^1.7.0 http: ^1.1.2 google_sign_in: ^6.2.1 firebase_ui_shared: ^1.4.1 - firebase_database: ^11.1.5 + firebase_database: ^11.3.0 firebase_ui_database: ^1.5.0 dev_dependencies: