Skip to content

Commit e522fb1

Browse files
authored
chore(auth): upgrade gradle (#12882)
1 parent 2ee2a54 commit e522fb1

File tree

14 files changed

+145
-150
lines changed

14 files changed

+145
-150
lines changed

packages/firebase_auth/firebase_auth/example/.metadata

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
8-
channel: stable
7+
revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
17-
base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
18-
- platform: windows
19-
create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
20-
base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
16+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
17+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
18+
- platform: android
19+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
20+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
2121

2222
# User provided section
2323

Lines changed: 31 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,60 @@
1+
plugins {
2+
id "com.android.application"
3+
// START: FlutterFire Configuration
4+
id 'com.google.gms.google-services'
5+
// END: FlutterFire Configuration
6+
id "kotlin-android"
7+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
8+
id "dev.flutter.flutter-gradle-plugin"
9+
}
10+
111
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
12+
def localPropertiesFile = rootProject.file("local.properties")
313
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
14+
localPropertiesFile.withReader("UTF-8") { reader ->
515
localProperties.load(reader)
616
}
717
}
818

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
19+
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
1520
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
21+
flutterVersionCode = "1"
1722
}
1823

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
24+
def flutterVersionName = localProperties.getProperty("flutter.versionName")
2025
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
26+
flutterVersionName = "1.0"
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
29-
// Conditional for compatibility with AGP <4.2.
30-
if (project.android.hasProperty("namespace")) {
31-
namespace 'io.flutter.plugins.firebaseauthexample'
32-
}
33-
34-
compileSdk flutter.compileSdkVersion
35-
36-
defaultConfig {
37-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38-
applicationId "io.flutter.plugins.firebase.auth.example"
39-
minSdk 21
40-
targetSdkVersion flutter.targetSdkVersion
41-
versionCode flutterVersionCode.toInteger()
42-
versionName flutterVersionName
43-
multiDexEnabled true
44-
}
30+
namespace = "io.flutter.plugins.firebase.auth.example"
31+
compileSdk = flutter.compileSdkVersion
32+
ndkVersion = flutter.ndkVersion
4533

4634
compileOptions {
47-
sourceCompatibility JavaVersion.VERSION_1_8
48-
targetCompatibility JavaVersion.VERSION_1_8
49-
}
50-
51-
kotlinOptions {
52-
jvmTarget = '1.8'
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
5337
}
5438

55-
sourceSets {
56-
main.java.srcDirs += 'src/main/kotlin'
39+
defaultConfig {
40+
applicationId = "io.flutter.plugins.firebase.auth.example"
41+
// You can update the following values to match your application needs.
42+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
43+
minSdk = 23 // flutter.minSdkVersion is 21 while firebase_auth minSdkVersion is 23
44+
targetSdk = flutter.targetSdkVersion
45+
versionCode = flutterVersionCode.toInteger()
46+
versionName = flutterVersionName
5747
}
5848

5949
buildTypes {
6050
release {
6151
// TODO: Add your own signing config for the release build.
6252
// Signing with the debug keys for now, so `flutter run --release` works.
63-
signingConfig signingConfigs.debug
53+
signingConfig = signingConfigs.debug
6454
}
6555
}
6656
}
6757

6858
flutter {
69-
source '../..'
59+
source = "../.."
7060
}
71-
72-
dependencies {
73-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
74-
}
75-
76-
apply plugin: 'com.google.gms.google-services'

packages/firebase_auth/firebase_auth/example/android/app/google-services.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@
102102
"certificate_hash": "5ad0d6d5cbe577ca185b8df246656bebc3957128"
103103
}
104104
},
105+
{
106+
"client_id": "406099696497-in8bfp0nali85oul1o98huoar6eo1vv1.apps.googleusercontent.com",
107+
"client_type": 1,
108+
"android_info": {
109+
"package_name": "io.flutter.plugins.firebase.auth.example",
110+
"certificate_hash": "909ca1482ef022bbae45a2db6b6d05d807a4c4aa"
111+
}
112+
},
105113
{
106114
"client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com",
107115
"client_type": 3
@@ -406,6 +414,22 @@
406414
}
407415
},
408416
"oauth_client": [
417+
{
418+
"client_id": "406099696497-ib9hj9281l3343cm3nfvvdotaojrthdc.apps.googleusercontent.com",
419+
"client_type": 1,
420+
"android_info": {
421+
"package_name": "io.flutter.plugins.firebase.tests",
422+
"certificate_hash": "5ad0d6d5cbe577ca185b8df246656bebc3957128"
423+
}
424+
},
425+
{
426+
"client_id": "406099696497-lc54d5l8sp90k39r0bb39ovsgo1s9bek.apps.googleusercontent.com",
427+
"client_type": 1,
428+
"android_info": {
429+
"package_name": "io.flutter.plugins.firebase.tests",
430+
"certificate_hash": "909ca1482ef022bbae45a2db6b6d05d807a4c4aa"
431+
}
432+
},
409433
{
410434
"client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com",
411435
"client_type": 3

packages/firebase_auth/firebase_auth/example/android/app/src/debug/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<!-- Flutter needs it to communicate with the running application
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
34
to allow setting breakpoints, to provide hot reload, etc.
45
-->
56
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,45 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<application
3-
android:name="${applicationName}"
4-
android:icon="@mipmap/ic_launcher"
5-
android:label="Firebase Auth"
6-
android:usesCleartextTraffic="true">
7-
<meta-data
8-
android:name="com.facebook.sdk.ApplicationId"
9-
android:value="@string/facebook_app_id" />
10-
<meta-data
11-
android:name="com.facebook.sdk.ClientToken"
12-
android:value="@string/facebook_client_token" />
13-
<meta-data android:name="com.google.android.gms.games.APP_ID"
14-
android:value="@string/game_services_project_id"/>
15-
<activity
16-
android:name=".MainActivity"
17-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
18-
android:exported="true"
19-
android:hardwareAccelerated="true"
20-
android:launchMode="singleTop"
21-
android:theme="@style/LaunchTheme"
22-
android:windowSoftInputMode="adjustResize">
23-
<!-- Specifies an Android theme to apply to this Activity as soon as
24-
the Android process has started. This theme is visible to the user
25-
while the Flutter UI initializes. After that, this theme continues
26-
to determine the Window background behind the Flutter UI. -->
27-
<meta-data
28-
android:name="io.flutter.embedding.android.NormalTheme"
29-
android:resource="@style/NormalTheme" />
2+
<application
3+
android:label="example"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:taskAffinity=""
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
<category android:name="android.intent.category.LAUNCHER"/>
26+
</intent-filter>
27+
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30+
<meta-data
31+
android:name="flutterEmbedding"
32+
android:value="2" />
33+
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
3037
31-
<intent-filter>
32-
<action android:name="android.intent.action.MAIN" />
33-
<category android:name="android.intent.category.LAUNCHER" />
34-
</intent-filter>
35-
<intent-filter>
36-
<action android:name="android.intent.action.VIEW" />
37-
38-
<category android:name="android.intent.category.DEFAULT" />
39-
<category android:name="android.intent.category.BROWSABLE" />
40-
<!-- Accepts URIs that begin with "example://gizmos” -->
41-
<!-- Registered Callback URLs in TwitterApp -->
42-
<data android:scheme="flutterfireauth" />
43-
</intent-filter>
44-
</activity>
45-
<!-- Don't delete the meta-data below.
46-
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
47-
<meta-data
48-
android:name="flutterEmbedding"
49-
android:value="2" />
50-
</application>
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
5145
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package io.flutter.plugins.firebase.auth.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity()

packages/firebase_auth/firebase_auth/example/android/app/src/main/kotlin/io/flutter/plugins/firebase/example/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values-night/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.

packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/strings.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/firebase_auth/firebase_auth/example/android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.

0 commit comments

Comments
 (0)