From d7631275fe9484e5f048489b1c5031252b6e8029 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Fri, 15 Oct 2021 13:41:48 -0700 Subject: [PATCH] Bump targetSdkVersion to 31 and organize static values (#91719) --- .gitignore | 2 +- .../complex_layout/android/app/build.gradle | 6 +- .../macrobenchmarks/android/app/build.gradle | 6 +- .../microbenchmarks/android/app/build.gradle | 6 +- .../android/app/build.gradle | 6 +- .../android/app/build.gradle | 6 +- .../test_apps/stocks/android/app/build.gradle | 6 +- .../android/app/build.gradle | 4 +- .../.gradle/6.3/fileChanges/last-build.bin | Bin 1 -> 0 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../android/app/build.gradle | 4 +- .../.gradle/6.3/fileChanges/last-build.bin | Bin 1 -> 0 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../android/app/build.gradle | 6 +- .../android_views/android/app/build.gradle | 6 +- .../android/app/src/main/AndroidManifest.xml | 7 +- .../channels/android/app/build.gradle | 6 +- .../android/app/build.gradle | 6 +- .../external_ui/android/app/build.gradle | 6 +- .../flavors/android/app/build.gradle | 6 +- .../flutter_gallery/android/app/build.gradle | 6 +- .../android/app/build.gradle | 4 +- .../android/app/build.gradle | 6 +- .../.gradle/6.3/fileChanges/last-build.bin | Bin 1 -> 0 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../non_nullable/android/app/build.gradle | 6 +- .../android/app/build.gradle | 6 +- .../android/app/build.gradle | 6 +- .../ui/android/app/build.gradle | 6 +- dev/manual_tests/android/app/build.gradle | 6 +- examples/api/android/app/build.gradle | 6 +- .../flutter_view/android/app/build.gradle | 6 +- examples/hello_world/android/app/build.gradle | 6 +- examples/image_list/android/app/build.gradle | 6 +- examples/layers/android/app/build.gradle | 6 +- .../platform_channel/android/app/build.gradle | 6 +- .../platform_view/android/app/build.gradle | 6 +- packages/flutter_tools/gradle/flutter.gradle | 147 +++++++++++------- .../android-java.tmpl/app/build.gradle.tmpl | 6 +- .../android-kotlin.tmpl/app/build.gradle.tmpl | 6 +- .../Flutter.tmpl/build.gradle.tmpl | 6 +- .../commands.shard/permeable/create_test.dart | 6 +- .../deferred_components_test.dart | 3 +- .../deferred_components_project.dart | 6 +- .../example/android/app/build.gradle | 6 +- 48 files changed, 198 insertions(+), 165 deletions(-) delete mode 100644 dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin delete mode 100644 dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties delete mode 100644 dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties delete mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin delete mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties delete mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties delete mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin delete mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/gc.properties delete mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/vcs-1/gc.properties diff --git a/.gitignore b/.gitignore index 56909ccd398..d193fc165ac 100644 --- a/.gitignore +++ b/.gitignore @@ -61,7 +61,7 @@ unlinked_spec.ds # Android related **/android/**/gradle-wrapper.jar -**/android/.gradle +.gradle/ **/android/captures/ **/android/gradlew **/android/gradlew.bat diff --git a/dev/benchmarks/complex_layout/android/app/build.gradle b/dev/benchmarks/complex_layout/android/app/build.gradle index ae4ff7be2fa..a923d9f5c69 100644 --- a/dev/benchmarks/complex_layout/android/app/build.gradle +++ b/dev/benchmarks/complex_layout/android/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_11 @@ -27,8 +27,8 @@ android { } defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode 1 versionName "0.0.1" } diff --git a/dev/benchmarks/macrobenchmarks/android/app/build.gradle b/dev/benchmarks/macrobenchmarks/android/app/build.gradle index c28a0849579..e4a741830c5 100644 --- a/dev/benchmarks/macrobenchmarks/android/app/build.gradle +++ b/dev/benchmarks/macrobenchmarks/android/app/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -38,8 +38,8 @@ android { defaultConfig { applicationId "com.example.macrobenchmarks" - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/dev/benchmarks/microbenchmarks/android/app/build.gradle b/dev/benchmarks/microbenchmarks/android/app/build.gradle index f65b47e31fd..2190a0fcfb2 100644 --- a/dev/benchmarks/microbenchmarks/android/app/build.gradle +++ b/dev/benchmarks/microbenchmarks/android/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -27,8 +27,8 @@ android { } defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode 1 versionName "0.0.1" } diff --git a/dev/benchmarks/platform_views_layout/android/app/build.gradle b/dev/benchmarks/platform_views_layout/android/app/build.gradle index f65b47e31fd..2190a0fcfb2 100644 --- a/dev/benchmarks/platform_views_layout/android/app/build.gradle +++ b/dev/benchmarks/platform_views_layout/android/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -27,8 +27,8 @@ android { } defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode 1 versionName "0.0.1" } diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle index f65b47e31fd..2190a0fcfb2 100644 --- a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -27,8 +27,8 @@ android { } defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode 1 versionName "0.0.1" } diff --git a/dev/benchmarks/test_apps/stocks/android/app/build.gradle b/dev/benchmarks/test_apps/stocks/android/app/build.gradle index 496e43c9956..ea3c1c51356 100644 --- a/dev/benchmarks/test_apps/stocks/android/app/build.gradle +++ b/dev/benchmarks/test_apps/stocks/android/app/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -38,8 +38,8 @@ android { defaultConfig { applicationId "io.flutter.examples.stocks" - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle b/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle index 8327dec598a..4228205226a 100644 --- a/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle +++ b/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle @@ -30,7 +30,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -49,7 +49,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.abstract_method_smoke_test" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1 IcmZPo000310RR91 diff --git a/dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties b/dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties b/dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle b/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle index 974c2383aad..2048fecbc41 100644 --- a/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle +++ b/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle @@ -30,7 +30,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -49,7 +49,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.android_embedding_v2_smoke_test" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1 IcmZPo000310RR91 diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties b/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties b/dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dev/integration_tests/android_semantics_testing/android/app/build.gradle b/dev/integration_tests/android_semantics_testing/android/app/build.gradle index f65b47e31fd..2190a0fcfb2 100644 --- a/dev/integration_tests/android_semantics_testing/android/app/build.gradle +++ b/dev/integration_tests/android_semantics_testing/android/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -27,8 +27,8 @@ android { } defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode 1 versionName "0.0.1" } diff --git a/dev/integration_tests/android_views/android/app/build.gradle b/dev/integration_tests/android_views/android/app/build.gradle index 2e35560e884..50d3cbb6546 100644 --- a/dev/integration_tests/android_views/android/app/build.gradle +++ b/dev/integration_tests/android_views/android/app/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -39,8 +39,8 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.flutter.integration.platformviews" - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml b/dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml index e2c60de9b1b..8387ccf5801 100644 --- a/dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml +++ b/dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml @@ -5,13 +5,14 @@ found in the LICENSE file. --> - + android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" android:value="true" /> - - + +