From 5ec584e819632009f8d0692365b62590636b7d00 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sat, 24 Jun 2023 06:18:41 +0200 Subject: [PATCH] Fix Android CI (#1908) - kotlin version to 1.8.22 - remove deprecated kotlin-android-extensions and upgrade dependencies Running the PR from the flutter/samples repo instead from a fork, so the Firebase device test step runs. ## Pre-launch Checklist - [ ] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [ ] I signed the [CLA]. - [ ] I read the [Contributors Guide]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --- .../android_fullscreen/app/build.gradle | 16 +++++++--------- .../fullscreen/android_fullscreen/build.gradle | 2 +- .../multiple_flutters_android/build.gradle | 2 +- .../plugin/android_using_plugin/app/build.gradle | 12 +++++------- .../plugin/android_using_plugin/build.gradle | 2 +- .../app/build.gradle | 16 +++++++--------- .../android_using_prebuilt_module/build.gradle | 2 +- 7 files changed, 23 insertions(+), 29 deletions(-) diff --git a/add_to_app/fullscreen/android_fullscreen/app/build.gradle b/add_to_app/fullscreen/android_fullscreen/app/build.gradle index 427d3ee2e..f8446b44f 100644 --- a/add_to_app/fullscreen/android_fullscreen/app/build.gradle +++ b/add_to_app/fullscreen/android_fullscreen/app/build.gradle @@ -2,8 +2,6 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - android { compileSdkVersion 33 defaultConfig { @@ -31,13 +29,13 @@ dependencies { implementation 'androidx.multidex:multidex:2.0.1' implementation project(':flutter') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.12' androidTestImplementation project(':espresso') - androidTestImplementation "com.google.truth:truth:0.42" - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' - api 'androidx.test:core:1.2.0' + androidTestImplementation "com.google.truth:truth:1.1.3" + androidTestImplementation 'androidx.test:runner:1.5.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + api 'androidx.test:core:1.5.0' } diff --git a/add_to_app/fullscreen/android_fullscreen/build.gradle b/add_to_app/fullscreen/android_fullscreen/build.gradle index 0303ba596..ae82de792 100644 --- a/add_to_app/fullscreen/android_fullscreen/build.gradle +++ b/add_to_app/fullscreen/android_fullscreen/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.0' + ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() diff --git a/add_to_app/multiple_flutters/multiple_flutters_android/build.gradle b/add_to_app/multiple_flutters/multiple_flutters_android/build.gradle index 113f15838..e1b756b13 100644 --- a/add_to_app/multiple_flutters/multiple_flutters_android/build.gradle +++ b/add_to_app/multiple_flutters/multiple_flutters_android/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.6.0" + ext.kotlin_version = "1.8.22" repositories { google() mavenCentral() diff --git a/add_to_app/plugin/android_using_plugin/app/build.gradle b/add_to_app/plugin/android_using_plugin/app/build.gradle index 6cfe460a8..941b8bb4f 100644 --- a/add_to_app/plugin/android_using_plugin/app/build.gradle +++ b/add_to_app/plugin/android_using_plugin/app/build.gradle @@ -2,8 +2,6 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - android { compileSdkVersion 33 defaultConfig { @@ -28,10 +26,10 @@ android { dependencies { implementation project(':flutter') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' } diff --git a/add_to_app/plugin/android_using_plugin/build.gradle b/add_to_app/plugin/android_using_plugin/build.gradle index 0303ba596..ae82de792 100644 --- a/add_to_app/plugin/android_using_plugin/build.gradle +++ b/add_to_app/plugin/android_using_plugin/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.0' + ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() diff --git a/add_to_app/prebuilt_module/android_using_prebuilt_module/app/build.gradle b/add_to_app/prebuilt_module/android_using_prebuilt_module/app/build.gradle index 2a9174919..3e64c63c4 100644 --- a/add_to_app/prebuilt_module/android_using_prebuilt_module/app/build.gradle +++ b/add_to_app/prebuilt_module/android_using_prebuilt_module/app/build.gradle @@ -2,8 +2,6 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - android { compileSdkVersion 33 defaultConfig { @@ -50,12 +48,12 @@ dependencies { implementation 'androidx.multidex:multidex:2.0.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.12' - androidTestImplementation "com.google.truth:truth:0.42" - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' - api 'androidx.test:core:1.2.0' + androidTestImplementation "com.google.truth:truth:1.1.3" + androidTestImplementation 'androidx.test:runner:1.5.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + api 'androidx.test:core:1.5.0' } diff --git a/add_to_app/prebuilt_module/android_using_prebuilt_module/build.gradle b/add_to_app/prebuilt_module/android_using_prebuilt_module/build.gradle index c9699d394..ae82de792 100644 --- a/add_to_app/prebuilt_module/android_using_prebuilt_module/build.gradle +++ b/add_to_app/prebuilt_module/android_using_prebuilt_module/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.21' + ext.kotlin_version = '1.8.22' repositories { google() mavenCentral()