diff --git a/packages/firebase_storage/firebase_storage/example/.metadata b/packages/firebase_storage/firebase_storage/example/.metadata index e0d11d9c4316..65a4a371c766 100644 --- a/packages/firebase_storage/firebase_storage/example/.metadata +++ b/packages/firebase_storage/firebase_storage/example/.metadata @@ -4,8 +4,8 @@ # This file should be version controlled and should not be manually edited. version: - revision: "2e05371c88da377d72bb1de95dcd25b4cbe3fe1a" - channel: "master" + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" + channel: "stable" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 2e05371c88da377d72bb1de95dcd25b4cbe3fe1a - base_revision: 2e05371c88da377d72bb1de95dcd25b4cbe3fe1a - - platform: windows - create_revision: 2e05371c88da377d72bb1de95dcd25b4cbe3fe1a - base_revision: 2e05371c88da377d72bb1de95dcd25b4cbe3fe1a + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + - platform: android + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 # User provided section diff --git a/packages/firebase_storage/firebase_storage/example/android/.gitignore b/packages/firebase_storage/firebase_storage/example/android/.gitignore new file mode 100644 index 000000000000..6f568019d3c6 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/firebase_storage/firebase_storage/example/android/app/build.gradle b/packages/firebase_storage/firebase_storage/example/android/app/build.gradle old mode 100755 new mode 100644 index 70a7bb4cfbc2..557551759892 --- a/packages/firebase_storage/firebase_storage/example/android/app/build.gradle +++ b/packages/firebase_storage/firebase_storage/example/android/app/build.gradle @@ -1,67 +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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - namespace 'io.flutter.plugins.firebasestorageexample' - - compileSdk 34 + namespace = "io.flutter.plugins.firebasestorageexample" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion - defaultConfig { - applicationId 'io.flutter.plugins.firebasestorageexample' - minSdk 21 - targetSdk 33 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildFeatures { - buildConfig = true + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } - lintOptions { - disable 'InvalidPackage' + defaultConfig { + applicationId = "io.flutter.plugins.firebasestorageexample" + // 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 = flutter.minSdkVersion + 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 '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + source = "../.." } diff --git a/packages/firebase_storage/firebase_storage/example/android/app/google-services.json b/packages/firebase_storage/firebase_storage/example/android/app/google-services.json index 86ad74083731..6b7e04085d8b 100644 --- a/packages/firebase_storage/firebase_storage/example/android/app/google-services.json +++ b/packages/firebase_storage/firebase_storage/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_storage/firebase_storage/example/android/app/src/androidTest/java/io/flutter/plugins/firebasestorageexample/MainActivityTest.java b/packages/firebase_storage/firebase_storage/example/android/app/src/androidTest/java/io/flutter/plugins/firebasestorageexample/MainActivityTest.java deleted file mode 100644 index a03bd51d8d39..000000000000 --- a/packages/firebase_storage/firebase_storage/example/android/app/src/androidTest/java/io/flutter/plugins/firebasestorageexample/MainActivityTest.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package io.flutter.plugins.firebasestorageexample; - -import androidx.test.rule.ActivityTestRule; -import dev.flutter.plugins.e2e.FlutterTestRunner; -import io.flutter.embedding.android.FlutterActivity; -import org.junit.Rule; -import org.junit.runner.RunWith; - -@RunWith(FlutterTestRunner.class) -public class MainActivityTest { - @Rule public ActivityTestRule rule = new ActivityTestRule<>(MainActivity.class); -} diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/debug/AndroidManifest.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000000..399f6981d5d3 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/AndroidManifest.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/main/AndroidManifest.xml old mode 100755 new mode 100644 index 0fbff9e4955a..f8f8dcf140bb --- a/packages/firebase_storage/firebase_storage/example/android/app/src/main/AndroidManifest.xml +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/AndroidManifest.xml @@ -1,25 +1,45 @@ - - - - - - - + + - - - - - + android:launchMode="singleTop" + android:taskAffinity="" + android:theme="@style/LaunchTheme" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" + android:hardwareAccelerated="true" + android:windowSoftInputMode="adjustResize"> + + + + + + - + + + + + + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/kotlin/io/flutter/plugins/firebasestorageexample/MainActivity.kt b/packages/firebase_storage/firebase_storage/example/android/app/src/main/kotlin/io/flutter/plugins/firebasestorageexample/MainActivity.kt new file mode 100644 index 000000000000..7391f3a97ef9 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/kotlin/io/flutter/plugins/firebasestorageexample/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.firebasestorageexample + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000000..f74085f3f6a2 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable/launch_background.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000000..304732f88420 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values-night/styles.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000000..06952be745f9 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values/styles.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000000..cb1ef88056ed --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/app/src/profile/AndroidManifest.xml b/packages/firebase_storage/firebase_storage/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000000..399f6981d5d3 --- /dev/null +++ b/packages/firebase_storage/firebase_storage/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/firebase_storage/firebase_storage/example/android/build.gradle b/packages/firebase_storage/firebase_storage/example/android/build.gradle old mode 100755 new mode 100644 index 596f4cd3857e..d2ffbffa4cd2 --- a/packages/firebase_storage/firebase_storage/example/android/build.gradle +++ b/packages/firebase_storage/firebase_storage/example/android/build.gradle @@ -1,15 +1,3 @@ -buildscript { - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:8.1.2' - classpath 'com.google.gms:google-services:4.3.15' - } -} - allprojects { repositories { google() @@ -17,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_storage/firebase_storage/example/android/gradle.properties b/packages/firebase_storage/firebase_storage/example/android/gradle.properties old mode 100755 new mode 100644 index aa8601e3000f..3b5b324f6e3f --- a/packages/firebase_storage/firebase_storage/example/android/gradle.properties +++ b/packages/firebase_storage/firebase_storage/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_storage/firebase_storage/example/android/settings.gradle b/packages/firebase_storage/firebase_storage/example/android/settings.gradle old mode 100755 new mode 100644 index 5a2f14fb18f6..7fb86d70412c --- a/packages/firebase_storage/firebase_storage/example/android/settings.gradle +++ b/packages/firebase_storage/firebase_storage/example/android/settings.gradle @@ -1,15 +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 flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory +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"