Visitar URL original
fix(ci): bump Kotlin Gradle plugin to 2.3.0 (#18600) · firebase/flutterfire@4c3865e · GitHub
Skip to content

Commit 4c3865e

Browse files
authored
fix(ci): bump Kotlin Gradle plugin to 2.3.0 (#18600)
* fix(ci): bump Kotlin Gradle plugin to 2.3.0 firebase-auth 24.2.0 ships Kotlin 2.3.0 metadata that example apps still compiling with 1.9/2.1 cannot consume. * fix(ci): migrate example apps off deprecated kotlinOptions DSL Kotlin 2.3.0 rejects android.kotlinOptions.jvmTarget as a String. Use kotlin.compilerOptions instead.
1 parent 128912e commit 4c3865e

38 files changed

Lines changed: 128 additions & 90 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ android {
3737
targetCompatibility = project.ext.javaVersion
3838
}
3939

40-
kotlinOptions {
41-
jvmTarget = "17"
42-
}
4340

4441
defaultConfig {
4542
applicationId = "io.flutter.plugins.firebase.firestore.example"
@@ -63,3 +60,9 @@ android {
6360
flutter {
6461
source = "../.."
6562
}
63+
64+
kotlin {
65+
compilerOptions {
66+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
67+
}
68+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration
25-
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
25+
id "org.jetbrains.kotlin.android" version "2.3.0" apply false
2626
}
2727

2828
include ":app"

‎packages/cloud_firestore/cloud_firestore/pipeline_example/android/app/build.gradle.kts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ android {
1818
targetCompatibility = JavaVersion.VERSION_17
1919
}
2020

21-
kotlinOptions {
22-
jvmTarget = JavaVersion.VERSION_17.toString()
23-
}
24-
2521
defaultConfig {
2622
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
2723
applicationId = "com.example.pipeline_example"
@@ -45,3 +41,9 @@ android {
4541
flutter {
4642
source = "../.."
4743
}
44+
45+
kotlin {
46+
compilerOptions {
47+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
48+
}
49+
}

‎packages/cloud_firestore/cloud_firestore/pipeline_example/android/settings.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
// START: FlutterFire Configuration
2424
id("com.google.gms.google-services") version("4.3.15") apply false
2525
// END: FlutterFire Configuration
26-
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
26+
id("org.jetbrains.kotlin.android") version "2.3.0" apply false
2727
}
2828

2929
include(":app")

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ android {
3737
targetCompatibility = project.ext.javaVersion
3838
}
3939

40-
kotlinOptions {
41-
jvmTarget = "17"
42-
}
43-
4440
defaultConfig {
4541
applicationId = "io.flutter.plugins.firebase.functions.example"
4642
// You can update the following values to match your application needs.
@@ -63,3 +59,9 @@ android {
6359
flutter {
6460
source = "../.."
6561
}
62+
63+
kotlin {
64+
compilerOptions {
65+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
66+
}
67+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration
25-
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
25+
id "org.jetbrains.kotlin.android" version "2.3.0" apply false
2626
}
2727

2828
include ":app"

‎packages/firebase_ai/firebase_ai/example/android/app/build.gradle.kts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ android {
1515
targetCompatibility = JavaVersion.VERSION_11
1616
}
1717

18-
kotlinOptions {
19-
jvmTarget = JavaVersion.VERSION_11.toString()
20-
}
21-
2218
defaultConfig {
2319
// Deliberately the mega test app's Firebase app identity: the live-service
2420
// e2e suite in `integration_test/` talks to real Firebase backends, which
@@ -47,3 +43,9 @@ android {
4743
flutter {
4844
source = "../.."
4945
}
46+
47+
kotlin {
48+
compilerOptions {
49+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
50+
}
51+
}

‎packages/firebase_ai/firebase_ai/example/android/settings.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pluginManagement {
1919
plugins {
2020
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
2121
id("com.android.application") version "8.9.1" apply false
22-
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
22+
id("org.jetbrains.kotlin.android") version "2.3.0" apply false
2323
}
2424

2525
include(":app")

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ android {
3737
targetCompatibility = project.ext.javaVersion
3838
}
3939

40-
kotlinOptions {
41-
jvmTarget = "17"
42-
}
43-
4440
defaultConfig {
4541
// Deliberately the mega test app's Firebase app identity: the live-service
4642
// e2e suite in `integration_test/` talks to real Firebase backends, which
@@ -69,3 +65,9 @@ android {
6965
flutter {
7066
source = "../.."
7167
}
68+
69+
kotlin {
70+
compilerOptions {
71+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
72+
}
73+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222
// START: FlutterFire Configuration
2323
id "com.google.gms.google-services" version "4.3.15" apply false
2424
// END: FlutterFire Configuration
25-
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
25+
id "org.jetbrains.kotlin.android" version "2.3.0" apply false
2626
}
2727

2828
include ":app"

0 commit comments

Comments
 (0)