Skip to content

Commit abadfb5

Browse files
[various] Update example apps to Kotlin 1.9.0 (#7998)
Follow-up to #7997 to update all example apps to 1.9.0 to protect us from similar OOB failures as other transitive dependencies in the ecosystem update to newer versions of Kotlin.
1 parent da4c3ee commit abadfb5

File tree

20 files changed

+44
-20
lines changed

20 files changed

+44
-20
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ android {
2929
namespace 'dev.flutter.packages.animations.example'
3030
compileSdk flutter.compileSdkVersion
3131

32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_11
34+
targetCompatibility JavaVersion.VERSION_11
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = '11'
39+
}
40+
3241
sourceSets {
3342
main.java.srcDirs += 'src/main/kotlin'
3443
}

packages/animations/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/camera/camera_android_camerax/example/android/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
buildscript {
2-
// This version should intentionally be a 1.7.* version and lower than the
3-
// version of kotlin-bom defined in packages/camera/camera_android_camerax/android/build.gradle.
4-
// This tests that the kotlin version resolution continues to work.
5-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
63
repositories {
74
google()
85
mavenCentral()

packages/file_selector/file_selector/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pluginManagement {
2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
2222
id "com.android.application" version "8.5.1" apply false
23-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
2424
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.1"
2525
}
2626

packages/file_selector/file_selector_android/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pluginManagement {
2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
2222
id "com.android.application" version "8.5.2" apply false
23-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
2424
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.1"
2525
}
2626

packages/flutter_adaptive_scaffold/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/flutter_image/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2828
android {
2929
compileSdk flutter.compileSdkVersion
3030

31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_11
33+
targetCompatibility JavaVersion.VERSION_11
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '11'
38+
}
39+
3140
sourceSets {
3241
main.java.srcDirs += 'src/main/kotlin'
3342
}

packages/flutter_markdown/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/pigeon/platform_tests/test_plugin/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.8.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/rfw/example/hello/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/rfw/example/local/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/rfw/example/remote/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/shared_preferences/shared_preferences/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/shared_preferences/shared_preferences_android/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.8.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
mavenCentral()

packages/two_dimensional_scrollables/example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pluginManagement {
2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
2222
id "com.android.application" version "8.5.2" apply false
23-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
2424
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.1"
2525
}
2626

third_party/packages/flutter_svg/example/android/app/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ android {
2929
namespace 'io.flutter.plugins.fluttersvgexample'
3030
compileSdkVersion flutter.compileSdkVersion
3131

32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_11
34+
targetCompatibility JavaVersion.VERSION_11
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = '11'
39+
}
40+
3241
sourceSets {
3342
main.java.srcDirs += 'src/main/kotlin'
3443
}

third_party/packages/flutter_svg/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.0'
33
repositories {
44
google()
55
jcenter()

0 commit comments

Comments
 (0)