Skip to content

Commit 2ee2a54

Browse files
authored
chore(app_installations): upgrade gradle (#12881)
1 parent 1733598 commit 2ee2a54

File tree

12 files changed

+150
-81
lines changed

12 files changed

+150
-81
lines changed

packages/firebase_app_installations/firebase_app_installations/example/.metadata

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@
44
# This file should be version controlled and should not be manually edited.
55

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

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
17+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
18+
- platform: android
19+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
20+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'
Lines changed: 31 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +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 plugin: 'com.google.gms.google-services'
27-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28-
2929
android {
30-
namespace 'io.flutter.plugins.firebase.installations.example'
31-
32-
compileSdk 34
33-
34-
defaultConfig {
35-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36-
applicationId "io.flutter.plugins.firebase.installations.example"
37-
minSdk 21
38-
targetSdk 33
39-
versionCode flutterVersionCode.toInteger()
40-
versionName flutterVersionName
41-
}
30+
namespace = "io.flutter.plugins.firebase.installations.example"
31+
compileSdk = flutter.compileSdkVersion
32+
ndkVersion = flutter.ndkVersion
4233

4334
compileOptions {
44-
sourceCompatibility JavaVersion.VERSION_1_8
45-
targetCompatibility JavaVersion.VERSION_1_8
46-
}
47-
48-
kotlinOptions {
49-
jvmTarget = '1.8'
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
5037
}
5138

52-
sourceSets {
53-
main.java.srcDirs += 'src/main/kotlin'
39+
defaultConfig {
40+
applicationId = "io.flutter.plugins.firebase.installations.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 = flutter.minSdkVersion
44+
targetSdk = flutter.targetSdkVersion
45+
versionCode = flutterVersionCode.toInteger()
46+
versionName = flutterVersionName
5447
}
5548

5649
buildTypes {
5750
release {
5851
// TODO: Add your own signing config for the release build.
5952
// Signing with the debug keys for now, so `flutter run --release` works.
60-
signingConfig signingConfigs.debug
53+
signingConfig = signingConfigs.debug
6154
}
6255
}
6356
}
6457

6558
flutter {
66-
source '../..'
67-
}
68-
69-
dependencies {
70-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
59+
source = "../.."
7160
}

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,22 @@
9494
}
9595
},
9696
"oauth_client": [
97+
{
98+
"client_id": "406099696497-emmujnd7g2ammh5uu9ni6v04p4ateqac.apps.googleusercontent.com",
99+
"client_type": 1,
100+
"android_info": {
101+
"package_name": "io.flutter.plugins.firebase.auth.example",
102+
"certificate_hash": "5ad0d6d5cbe577ca185b8df246656bebc3957128"
103+
}
104+
},
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+
},
97113
{
98114
"client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com",
99115
"client_type": 3
@@ -398,6 +414,22 @@
398414
}
399415
},
400416
"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+
},
401433
{
402434
"client_id": "406099696497-a12gakvts4epfk5pkio7dphc1anjiggc.apps.googleusercontent.com",
403435
"client_type": 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>

packages/firebase_app_installations/firebase_app_installations/example/android/app/src/main/AndroidManifest.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<application
2+
<application
33
android:label="example"
4+
android:name="${applicationName}"
45
android:icon="@mipmap/ic_launcher">
56
<activity
67
android:name=".MainActivity"
7-
android:launchMode="singleTop"
88
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:taskAffinity=""
911
android:theme="@style/LaunchTheme"
1012
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1113
android:hardwareAccelerated="true"
@@ -29,4 +31,15 @@
2931
android:name="flutterEmbedding"
3032
android:value="2" />
3133
</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.
37+
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>
3245
</manifest>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package io.flutter.plugins.firebase.installations.example
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity: FlutterActivity()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
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.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
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.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.1.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
classpath 'com.google.gms:google-services:4.3.15'
12-
}
13-
}
14-
151
allprojects {
162
repositories {
173
google()
184
mavenCentral()
195
}
206
}
217

22-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
239
subprojects {
2410
project.buildDir = "${rootProject.buildDir}/${project.name}"
25-
project.evaluationDependsOn(':app')
11+
}
12+
subprojects {
13+
project.evaluationDependsOn(":app")
2614
}
2715

28-
task clean(type: Delete) {
16+
tasks.register("clean", Delete) {
2917
delete rootProject.buildDir
3018
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4-
android.defaults.buildfeatures.buildconfig=true
5-
android.nonTransitiveRClass=false
6-
android.nonFinalResIds=false
Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "7.3.0" apply false
22+
// START: FlutterFire Configuration
23+
id "com.google.gms.google-services" version "4.3.15" apply false
24+
// END: FlutterFire Configuration
25+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
26+
}
27+
28+
include ":app"

0 commit comments

Comments
 (0)