diff --git a/packages/firebase_auth/firebase_auth/example/.metadata b/packages/firebase_auth/firebase_auth/example/.metadata index d8f3153db8bb..65a4a371c766 100644 --- a/packages/firebase_auth/firebase_auth/example/.metadata +++ b/packages/firebase_auth/firebase_auth/example/.metadata @@ -1,11 +1,11 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled. +# This file should be version controlled and should not be manually edited. version: - revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2 - channel: stable + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" + channel: "stable" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2 - base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2 - - platform: windows - create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2 - base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + - platform: android + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 # User provided section diff --git a/packages/firebase_auth/firebase_auth/example/android/app/build.gradle b/packages/firebase_auth/firebase_auth/example/android/app/build.gradle index 39976af32cbc..ca39679aaeca 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/build.gradle +++ b/packages/firebase_auth/firebase_auth/example/android/app/build.gradle @@ -1,76 +1,60 @@ +plugins { + id "com.android.application" + // START: FlutterFire Configuration + id 'com.google.gms.google-services' + // END: FlutterFire Configuration + 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') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.firebaseauthexample' - } - - compileSdk flutter.compileSdkVersion - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "io.flutter.plugins.firebase.auth.example" - minSdk 21 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - multiDexEnabled true - } + namespace = "io.flutter.plugins.firebase.auth.example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + defaultConfig { + applicationId = "io.flutter.plugins.firebase.auth.example" + // 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. + minSdk = 23 // flutter.minSdkVersion is 21 while firebase_auth minSdkVersion is 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName } 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 '../..' + source = "../.." } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} - -apply plugin: 'com.google.gms.google-services' diff --git a/packages/firebase_auth/firebase_auth/example/android/app/google-services.json b/packages/firebase_auth/firebase_auth/example/android/app/google-services.json index 86ad74083731..6b7e04085d8b 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/google-services.json +++ b/packages/firebase_auth/firebase_auth/example/android/app/google-services.json @@ -102,6 +102,14 @@ "certificate_hash": "5ad0d6d5cbe577ca185b8df246656bebc3957128" } }, + { + "client_id": "406099696497-in8bfp0nali85oul1o98huoar6eo1vv1.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebase.auth.example", + "certificate_hash": "909ca1482ef022bbae45a2db6b6d05d807a4c4aa" + } + }, { "client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com", "client_type": 3 @@ -406,6 +414,22 @@ } }, "oauth_client": [ + { + "client_id": "406099696497-ib9hj9281l3343cm3nfvvdotaojrthdc.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebase.tests", + "certificate_hash": "5ad0d6d5cbe577ca185b8df246656bebc3957128" + } + }, + { + "client_id": "406099696497-lc54d5l8sp90k39r0bb39ovsgo1s9bek.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebase.tests", + "certificate_hash": "909ca1482ef022bbae45a2db6b6d05d807a4c4aa" + } + }, { "client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com", "client_type": 3 diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/debug/AndroidManifest.xml b/packages/firebase_auth/firebase_auth/example/android/app/src/debug/AndroidManifest.xml index f880684a6a9c..399f6981d5d3 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/src/debug/AndroidManifest.xml +++ b/packages/firebase_auth/firebase_auth/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,6 @@ - diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/main/AndroidManifest.xml b/packages/firebase_auth/firebase_auth/example/android/app/src/main/AndroidManifest.xml index 5aad623ca1e9..74a78b939e5e 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/src/main/AndroidManifest.xml +++ b/packages/firebase_auth/firebase_auth/example/android/app/src/main/AndroidManifest.xml @@ -1,51 +1,45 @@ - - - - - - - + + + + + + + + + + + + + - - - - - - - + In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> + + + + + + diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/auth/example/MainActivity.kt b/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/auth/example/MainActivity.kt new file mode 100644 index 000000000000..e8ca8519f78f --- /dev/null +++ b/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/auth/example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.firebase.auth.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/example/MainActivity.kt b/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/example/MainActivity.kt deleted file mode 100644 index 81a422f40f6b..000000000000 --- a/packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package io.flutter.plugins.firebaseauthexample - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values-night/styles.xml b/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values-night/styles.xml index 3db14bb5391f..06952be745f9 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values-night/styles.xml +++ b/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values-night/styles.xml @@ -3,7 +3,7 @@ - 16dbbdf0cfb309034a6ad98ac2a21688 - - 406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com - 406099696497 - diff --git a/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/styles.xml b/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/styles.xml index d460d1e9215b..cb1ef88056ed 100644 --- a/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/styles.xml +++ b/packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/styles.xml @@ -3,7 +3,7 @@ diff --git a/packages/firebase_auth/firebase_auth/example/android/build.gradle b/packages/firebase_auth/firebase_auth/example/android/build.gradle index 0724c11743f4..d2ffbffa4cd2 100644 --- a/packages/firebase_auth/firebase_auth/example/android/build.gradle +++ b/packages/firebase_auth/firebase_auth/example/android/build.gradle @@ -1,17 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:8.1.2' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -19,12 +5,12 @@ 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) { diff --git a/packages/firebase_auth/firebase_auth/example/android/gradle.properties b/packages/firebase_auth/firebase_auth/example/android/gradle.properties index aa8601e3000f..3b5b324f6e3f 100644 --- a/packages/firebase_auth/firebase_auth/example/android/gradle.properties +++ b/packages/firebase_auth/firebase_auth/example/android/gradle.properties @@ -1,5 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true -android.defaults.buildfeatures.buildconfig=true -android.nonTransitiveRClass=false -android.nonFinalResIds=false +android.enableJetifier=true diff --git a/packages/firebase_auth/firebase_auth/example/android/settings.gradle b/packages/firebase_auth/firebase_auth/example/android/settings.gradle index 44e62bcf06ae..7fb86d70412c 100644 --- a/packages/firebase_auth/firebase_auth/example/android/settings.gradle +++ b/packages/firebase_auth/firebase_auth/example/android/settings.gradle @@ -1,11 +1,28 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + // START: FlutterFire Configuration + id "com.google.gms.google-services" version "4.3.15" apply false + // END: FlutterFire Configuration + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app"