From e2c4ba31b83eef00a443c5f34af40268aa7f0669 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Mon, 24 Feb 2025 11:47:12 -0500 Subject: [PATCH] pure_android_host_apps android versions update (#163617) - **update pure_android_host_apps/android_custom_host_app to compileSdk/targetSdk 35, newest stable agp and gradle versions, update source compatibility to java 17, updated dependencies** - **Update documentation and migrate compileSdkVersion to compileSdk** - **Update gitignore to ignore specific module folder name and local.properties repo wide** Related to #149836 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --- .gitignore | 2 +- .../bin/tasks/module_custom_host_app_name_test.dart | 2 ++ .../pure_android_host_apps/.gitignore | 2 ++ .../android_custom_host_app/README.md | 2 ++ .../android_custom_host_app/SampleApp/build.gradle | 12 ++++++------ .../android_custom_host_app/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 3 ++- 7 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 dev/integration_tests/pure_android_host_apps/.gitignore diff --git a/.gitignore b/.gitignore index d43cb65efb1a0..1198fbaa72f9f 100644 --- a/.gitignore +++ b/.gitignore @@ -74,10 +74,10 @@ unlinked_spec.ds **/android/captures/ **/android/gradlew **/android/gradlew.bat -**/android/local.properties **/android/**/GeneratedPluginRegistrant.java **/android/key.properties *.jks +local.properties # iOS/XCode related **/ios/**/*.mode1v3 diff --git a/dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart b/dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart index a59cf8a8fe0eb..2d767dcd849c0 100644 --- a/dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart +++ b/dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart @@ -242,6 +242,7 @@ Future main() async { 'intermediates', 'assets', 'debug', + 'mergeDebugAssets', 'flutter_assets', 'assets', 'read-only.txt', @@ -315,6 +316,7 @@ Future main() async { 'intermediates', 'assets', 'release', + 'mergeReleaseAssets', 'flutter_assets', 'assets', 'read-only.txt', diff --git a/dev/integration_tests/pure_android_host_apps/.gitignore b/dev/integration_tests/pure_android_host_apps/.gitignore new file mode 100644 index 0000000000000..d36f2c6687214 --- /dev/null +++ b/dev/integration_tests/pure_android_host_apps/.gitignore @@ -0,0 +1,2 @@ +# Name for module used in integration test that should not be checked in. +hello/ diff --git a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/README.md b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/README.md index ac6220f72956c..58298306d186a 100644 --- a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/README.md +++ b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/README.md @@ -3,6 +3,8 @@ Android host app for a Flutter module created using ```sh $ flutter create -t module hello +$ cd hello +$ flutter build aar ``` and placed in a sibling folder to (a clone of) the host app. Used by the `module_custom_host_app_name_test.dart` device lab test. diff --git a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/SampleApp/build.gradle b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/SampleApp/build.gradle index 0227cf37b2d82..56ec3b21e2b44 100644 --- a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/SampleApp/build.gradle +++ b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/SampleApp/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'com.android.application' android { namespace = "io.flutter.add2app" - compileSdk 34 + compileSdk = 35 // Flutter's CI installs the NDK at a non-standard path. // This non-standard structure is initially created by @@ -18,14 +18,14 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } defaultConfig { applicationId "io.flutter.add2app" - minSdkVersion 21 - targetSdkVersion 34 + minSdk = 21 + targetSdk = 35 versionCode 1 versionName "1.0" } @@ -33,5 +33,5 @@ android { dependencies { implementation project(':flutter') - implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.appcompat:appcompat:1.7.0' } diff --git a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/build.gradle b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/build.gradle index 592d125fbc8ec..8715e3234ced1 100644 --- a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/build.gradle +++ b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/build.gradle @@ -8,7 +8,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.1.0' + classpath 'com.android.tools.build:gradle:8.8.1' } } diff --git a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/gradle/wrapper/gradle-wrapper.properties b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/gradle/wrapper/gradle-wrapper.properties index 5e6b542711355..ff9e5553ed41e 100644 --- a/dev/integration_tests/pure_android_host_apps/android_custom_host_app/gradle/wrapper/gradle-wrapper.properties +++ b/dev/integration_tests/pure_android_host_apps/android_custom_host_app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Feb 18 12:03:21 EST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip