Skip to content

Commit 95e624c

Browse files
chore(deps): Unify versions into global config and update AGP version to 8.2.1 (#17272)
* chore(deps): Unify versions into gobal config and update AGP version to 8.2.1 * chore(deps): bump gradle wrapper gradle version * fix(deps): get analytics * fix(deps): Fix performance * fix(deps): expose firebaseCoreProject * fix(deps): ensure desugaring enabled * fix(deps): create local configs for each package * chore(deps): local configs to example apps * chore(deps): dataconnect config * feat(deps): started script file to change java and compile versions * chore(deps): automated script working * fix: cleanup and make script copy gradle files only * fix: change path of global-config * chore: specific handling for auth * fix: revert melos.yaml change * chore: more meaningful comment * chore: match android-sdk versions * fix: support gradle * fix: ext issue * fix: removed random change * fix: ext issue * fix: test * feat: add AGP version support * chore: run script * feat: added supprot for example apps * feat: handle vertexai example app * feat: more unification and cleanup * chore: make settings.gradle apply properties * fix: last fixes, add note to script and include data-connect * Update scripts/generate_versions_gradle.dart Co-authored-by: Russell Wheatley <[email protected]> * Update scripts/generate_versions_gradle.dart Co-authored-by: Russell Wheatley <[email protected]> * chore: individualise each case to display what is going on * chore: cleanup script --------- Co-authored-by: Russell Wheatley <[email protected]>
1 parent 86350e9 commit 95e624c

File tree

101 files changed

+721
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+721
-201
lines changed

packages/cloud_firestore/cloud_firestore/android/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
group 'io.flutter.plugins.firebase.cloudfirestore'
22
version '1.0-SNAPSHOT'
33

4+
apply plugin: 'com.android.library'
5+
apply from: file("local-config.gradle")
6+
47
buildscript {
58
repositories {
69
google()
710
mavenCentral()
811
}
9-
1012
dependencies {
1113
classpath 'com.android.tools.build:gradle:8.3.0'
1214
}
@@ -19,7 +21,6 @@ allprojects {
1921
}
2022
}
2123

22-
apply plugin: 'com.android.library'
2324

2425
def firebaseCoreProject = findProject(':firebase_core')
2526
if (firebaseCoreProject == null) {
@@ -40,16 +41,16 @@ android {
4041
namespace 'io.flutter.plugins.firebase.firestore'
4142
}
4243

43-
compileSdk 35
44+
compileSdkVersion project.ext.compileSdk
4445

4546
defaultConfig {
46-
minSdk 21
47+
minSdkVersion project.ext.minSdk
4748
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4849
}
4950

5051
compileOptions {
51-
sourceCompatibility JavaVersion.VERSION_17
52-
targetCompatibility JavaVersion.VERSION_17
52+
sourceCompatibility project.ext.javaVersion
53+
targetCompatibility project.ext.javaVersion
5354
}
5455

5556
buildFeatures {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ext {
2+
compileSdk=34
3+
minSdk=21
4+
targetSdk=34
5+
javaVersion = JavaVersion.toVersion(17)
6+
androidGradlePluginVersion = '8.2.1'
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
rootProject.name = 'cloud_firestore'
2+
3+
apply from: file("local-config.gradle")
4+
5+
pluginManagement {
6+
plugins {
7+
id "com.android.application" version project.ext.androidGradlePluginVersion
8+
id "com.android.library" version project.ext.androidGradlePluginVersion
9+
}
10+
}

packages/cloud_firestore/cloud_firestore/example/android/app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
88
id "dev.flutter.flutter-gradle-plugin"
99
}
10+
apply from: file("../../../android/local-config.gradle")
1011

1112
def localProperties = new Properties()
1213
def localPropertiesFile = rootProject.file("local.properties")
@@ -32,8 +33,12 @@ android {
3233
ndkVersion = flutter.ndkVersion
3334

3435
compileOptions {
35-
sourceCompatibility = JavaVersion.VERSION_17
36-
targetCompatibility = JavaVersion.VERSION_17
36+
sourceCompatibility = project.ext.javaVersion
37+
targetCompatibility = project.ext.javaVersion
38+
}
39+
40+
kotlinOptions {
41+
jvmTarget = "17"
3742
}
3843

3944
defaultConfig {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
androidGradlePluginVersion=8.2.1

packages/cloud_firestore/cloud_firestore/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.3.0" apply false
21+
id "com.android.application" version "${androidGradlePluginVersion}" apply false
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration

packages/cloud_functions/cloud_functions/android/build.gradle

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
group 'io.flutter.plugins.firebase.cloudfunctions'
22
version '1.0-SNAPSHOT'
33

4+
apply plugin: 'com.android.library'
5+
apply from: file("local-config.gradle")
6+
47
buildscript {
58
repositories {
69
google()
710
mavenCentral()
811
}
9-
10-
dependencies {
11-
classpath 'com.android.tools.build:gradle:8.1.2'
12-
}
1312
}
1413

1514
rootProject.allprojects {
@@ -19,8 +18,6 @@ rootProject.allprojects {
1918
}
2019
}
2120

22-
apply plugin: 'com.android.library'
23-
2421
def firebaseCoreProject = findProject(':firebase_core')
2522
if (firebaseCoreProject == null) {
2623
throw new GradleException('Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?')
@@ -40,17 +37,18 @@ android {
4037
namespace 'io.flutter.plugins.firebase.functions'
4138
}
4239

43-
compileSdk 35
40+
compileSdkVersion project.ext.compileSdk
4441

4542
defaultConfig {
46-
minSdk 21
47-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
43+
minSdkVersion project.ext.minSdk
44+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4845
}
4946

5047
compileOptions {
51-
sourceCompatibility JavaVersion.VERSION_17
52-
targetCompatibility JavaVersion.VERSION_17
48+
sourceCompatibility project.ext.javaVersion
49+
targetCompatibility project.ext.javaVersion
5350
}
51+
5452
buildFeatures {
5553
buildConfig = true
5654
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ext {
2+
compileSdk=34
3+
minSdk=21
4+
targetSdk=34
5+
javaVersion = JavaVersion.toVersion(17)
6+
androidGradlePluginVersion = '8.2.1'
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
rootProject.name = 'cloud_functions'
2+
3+
apply from: file("local-config.gradle")
4+
5+
pluginManagement {
6+
plugins {
7+
id "com.android.application" version project.ext.androidGradlePluginVersion
8+
id "com.android.library" version project.ext.androidGradlePluginVersion
9+
}
10+
}

packages/cloud_functions/cloud_functions/example/android/app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
88
id "dev.flutter.flutter-gradle-plugin"
99
}
10+
apply from: file("../../../android/local-config.gradle")
1011

1112
def localProperties = new Properties()
1213
def localPropertiesFile = rootProject.file("local.properties")
@@ -32,8 +33,12 @@ android {
3233
ndkVersion = flutter.ndkVersion
3334

3435
compileOptions {
35-
sourceCompatibility = JavaVersion.VERSION_17
36-
targetCompatibility = JavaVersion.VERSION_17
36+
sourceCompatibility = project.ext.javaVersion
37+
targetCompatibility = project.ext.javaVersion
38+
}
39+
40+
kotlinOptions {
41+
jvmTarget = "17"
3742
}
3843

3944
defaultConfig {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
androidGradlePluginVersion=8.2.1

packages/cloud_functions/cloud_functions/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
21+
id "com.android.application" version "${androidGradlePluginVersion}" apply false
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration

packages/firebase_analytics/firebase_analytics/android/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
group 'io.flutter.plugins.firebase.analytics'
22
version '1.0-SNAPSHOT'
33

4+
apply plugin: 'com.android.library'
5+
apply from: file("local-config.gradle")
6+
47
buildscript {
58
ext.kotlin_version = "1.8.22"
69
repositories {
@@ -43,10 +46,10 @@ android {
4346
namespace 'io.flutter.plugins.firebase.analytics'
4447
}
4548

46-
compileSdk 35
49+
compileSdkVersion project.ext.compileSdk
4750

4851
defaultConfig {
49-
minSdk 21
52+
minSdkVersion project.ext.minSdk
5053
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
5154
}
5255

@@ -55,8 +58,8 @@ android {
5558
}
5659

5760
compileOptions {
58-
sourceCompatibility JavaVersion.VERSION_17
59-
targetCompatibility JavaVersion.VERSION_17
61+
sourceCompatibility project.ext.javaVersion
62+
targetCompatibility project.ext.javaVersion
6063
}
6164

6265
sourceSets {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ext {
2+
compileSdk=34
3+
minSdk=21
4+
targetSdk=34
5+
javaVersion = JavaVersion.toVersion(17)
6+
androidGradlePluginVersion = '8.2.1'
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
rootProject.name = 'firebase_analytics'
2+
3+
apply from: file("local-config.gradle")
4+
5+
pluginManagement {
6+
plugins {
7+
id "com.android.application" version project.ext.androidGradlePluginVersion
8+
id "com.android.library" version project.ext.androidGradlePluginVersion
9+
}
10+
}

packages/firebase_analytics/firebase_analytics/example/android/app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
88
id "dev.flutter.flutter-gradle-plugin"
99
}
10+
apply from: file("../../../android/local-config.gradle")
1011

1112
def localProperties = new Properties()
1213
def localPropertiesFile = rootProject.file("local.properties")
@@ -32,8 +33,12 @@ android {
3233
ndkVersion = flutter.ndkVersion
3334

3435
compileOptions {
35-
sourceCompatibility = JavaVersion.VERSION_17
36-
targetCompatibility = JavaVersion.VERSION_17
36+
sourceCompatibility = project.ext.javaVersion
37+
targetCompatibility = project.ext.javaVersion
38+
}
39+
40+
kotlinOptions {
41+
jvmTarget = "17"
3742
}
3843

3944
defaultConfig {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
androidGradlePluginVersion=8.2.1

packages/firebase_analytics/firebase_analytics/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
21+
id "com.android.application" version "${androidGradlePluginVersion}" apply false
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration

packages/firebase_app_check/firebase_app_check/android/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
group 'io.flutter.plugins.firebase.appcheck'
22
version '1.0-SNAPSHOT'
33

4+
apply plugin: 'com.android.library'
5+
apply from: file("local-config.gradle")
6+
47
buildscript {
58
repositories {
69
google()
@@ -19,8 +22,6 @@ rootProject.allprojects {
1922
}
2023
}
2124

22-
apply plugin: 'com.android.library'
23-
2425
def firebaseCoreProject = findProject(':firebase_core')
2526
if (firebaseCoreProject == null) {
2627
throw new GradleException('Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?')
@@ -40,16 +41,16 @@ android {
4041
namespace 'io.flutter.plugins.firebase.appcheck'
4142
}
4243

43-
compileSdk 35
44+
compileSdkVersion project.ext.compileSdk
4445

4546
defaultConfig {
46-
minSdk 21
47+
minSdkVersion project.ext.minSdk
4748
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4849
}
4950

5051
compileOptions {
51-
sourceCompatibility JavaVersion.VERSION_17
52-
targetCompatibility JavaVersion.VERSION_17
52+
sourceCompatibility project.ext.javaVersion
53+
targetCompatibility project.ext.javaVersion
5354
}
5455

5556
buildFeatures {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ext {
2+
compileSdk=34
3+
minSdk=21
4+
targetSdk=34
5+
javaVersion = JavaVersion.toVersion(17)
6+
androidGradlePluginVersion = '8.2.1'
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
rootProject.name = 'firebase_app_check'
2+
3+
apply from: file("local-config.gradle")
4+
5+
pluginManagement {
6+
plugins {
7+
id "com.android.application" version project.ext.androidGradlePluginVersion
8+
id "com.android.library" version project.ext.androidGradlePluginVersion
9+
}
10+
}

packages/firebase_app_check/firebase_app_check/example/android/app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
88
id "dev.flutter.flutter-gradle-plugin"
99
}
10+
apply from: file("../../../android/local-config.gradle")
1011

1112
def localProperties = new Properties()
1213
def localPropertiesFile = rootProject.file("local.properties")
@@ -32,8 +33,12 @@ android {
3233
ndkVersion = flutter.ndkVersion
3334

3435
compileOptions {
35-
sourceCompatibility = JavaVersion.VERSION_17
36-
targetCompatibility = JavaVersion.VERSION_17
36+
sourceCompatibility = project.ext.javaVersion
37+
targetCompatibility = project.ext.javaVersion
38+
}
39+
40+
kotlinOptions {
41+
jvmTarget = "17"
3742
}
3843

3944
defaultConfig {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
androidGradlePluginVersion=8.2.1

0 commit comments

Comments
 (0)