android_host_app_v2_embedding update dependencies and documentation (#164195)

Related to #149836 

Last of the non api 35 references in flutter/flutter for targetSdk and
compileSdk.
`find . -type f -name "build.gradle" | xargs grep -e "targetSdk" | tr -d
'=' | tr -s ' ' | grep -v flutter\.targetSdkVersion | grep -v
engine/src/flutter/third_party/ | grep -v "targetSdk 35"`
`find . -type f -name "build.gradle" | xargs grep -e "compileSdk" | tr
-d '=' | tr -s ' ' | grep -v flutter\.compileSdkVersion | grep -v
engine/src/flutter/third_party/ | grep -v "compileSdk 35"`

rewrite of https://github.com/flutter/flutter/pull/163622 after this
test was updated to run against a newer version of gradle and agp in
https://github.com/flutter/flutter/pull/163849/files#diff-83b6ad7c016bffbb682664eb65c576a7ebf9c312fc60727c0e0e20f5641cbc2aR462

Android-API-And-Related-Versions.md was updated to reflect that after
further investigation that android is using "=" in their documentation
and that the space syntax is discouraged. Equals is setting a property
and space is the equivalent to a function call like `compileSdk(35)` and
assignment is prefered.

The use of equals for proprty assignment also aligns with
https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html#prepare_your_groovy_scripts

## 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.
This commit is contained in:
Reid Baker 2025-02-27 15:31:08 -05:00 committed by GitHub
parent 6a073ce605
commit 72c2447307
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View File

@ -5,4 +5,4 @@ Android host app for a Flutter module created using
$ flutter create -t module hello $ flutter create -t module hello
``` ```
and placed in a sibling folder to (a clone of) the host app. and placed in a sibling folder to (a clone of) the host app.
Used by the `module_test.dart` device lab test. Used by the `build_android_host_app_with_module_aar.dart` device lab test.

View File

@ -6,7 +6,7 @@ apply plugin: 'com.android.application'
android { android {
namespace = "io.flutter.add2app" namespace = "io.flutter.add2app"
compileSdk 34 compileSdk = 35
// Flutter's CI installs the NDK at a non-standard path. // Flutter's CI installs the NDK at a non-standard path.
// This non-standard structure is initially created by // This non-standard structure is initially created by
@ -18,14 +18,14 @@ android {
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
} }
defaultConfig { defaultConfig {
applicationId "io.flutter.add2app" applicationId "io.flutter.add2app"
minSdkVersion 21 minSdk = 21
targetSdkVersion 34 targetSdk = 35
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
} }

View File

@ -24,14 +24,14 @@ If the versions chosen are not known by [gradle_utils.dart](https://github.com/f
``` ```
// OK // OK
android { android {
compileSdk flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
} }
``` ```
``` ```
// OK if flutter.compileSdkVersion is not available like in an add to app example. // OK if flutter.compileSdkVersion is not available like in an add to app example.
android { android {
compileSdk 35 compileSdk = 35
} }
``` ```
@ -53,14 +53,14 @@ android {
``` ```
// OK // OK
defaultConfig { defaultConfig {
targetSdk flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
} }
``` ```
``` ```
// OK if flutter.compileSdkVersion is not available like in an add to app example. // OK if flutter.compileSdkVersion is not available like in an add to app example.
defaultConfig { defaultConfig {
targetSdk 35 targetSdk = 35
} }
``` ```