Skip to content

Commit 72c2447

Browse files
authored
android_host_app_v2_embedding update dependencies and documentation (flutter#164195)
Related to flutter#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 flutter#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.
1 parent 6a073ce commit 72c2447

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Android host app for a Flutter module created using
55
$ flutter create -t module hello
66
```
77
and placed in a sibling folder to (a clone of) the host app.
8-
Used by the `module_test.dart` device lab test.
8+
Used by the `build_android_host_app_with_module_aar.dart` device lab test.

dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply plugin: 'com.android.application'
66

77
android {
88
namespace = "io.flutter.add2app"
9-
compileSdk 34
9+
compileSdk = 35
1010

1111
// Flutter's CI installs the NDK at a non-standard path.
1212
// This non-standard structure is initially created by
@@ -18,14 +18,14 @@ android {
1818
}
1919

2020
compileOptions {
21-
sourceCompatibility JavaVersion.VERSION_1_8
22-
targetCompatibility JavaVersion.VERSION_1_8
21+
sourceCompatibility JavaVersion.VERSION_17
22+
targetCompatibility JavaVersion.VERSION_17
2323
}
2424

2525
defaultConfig {
2626
applicationId "io.flutter.add2app"
27-
minSdkVersion 21
28-
targetSdkVersion 34
27+
minSdk = 21
28+
targetSdk = 35
2929
versionCode 1
3030
versionName "1.0"
3131
}

docs/contributing/Android-API-And-Related-Versions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ If the versions chosen are not known by [gradle_utils.dart](https://github.com/f
2424
```
2525
// OK
2626
android {
27-
compileSdk flutter.compileSdkVersion
27+
compileSdk = flutter.compileSdkVersion
2828
}
2929
```
3030

3131
```
3232
// OK if flutter.compileSdkVersion is not available like in an add to app example.
3333
android {
34-
compileSdk 35
34+
compileSdk = 35
3535
}
3636
```
3737

@@ -53,14 +53,14 @@ android {
5353
```
5454
// OK
5555
defaultConfig {
56-
targetSdk flutter.targetSdkVersion
56+
targetSdk = flutter.targetSdkVersion
5757
}
5858
```
5959

6060
```
6161
// OK if flutter.compileSdkVersion is not available like in an add to app example.
6262
defaultConfig {
63-
targetSdk 35
63+
targetSdk = 35
6464
}
6565
```
6666

0 commit comments

Comments
 (0)