Skip to content

Commit 5cd440f

Browse files
auto-submit[bot]auto-submit[bot]
and
auto-submit[bot]
authored
Reverts "Force automatic ndk download when building for Android (#159756)" (#160205)
<!-- start_original_pr_link --> Reverts: #159756 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: gmackall <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Made the tree red due to some std out. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: gmackall <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {reidbaker} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: In preparation for changing engine builds to be unstripped by default flutter/engine#52852, which will allow us to make progress towards resolving #60240. Tricks AGP in to downloading the NDK when building a flutter app (that uses the FGP, which to my knowledge is all ways of building flutter apk/aab/aar). I want to follow this up by modifying the tool to search for the log line that the NDK is missing (making it throw an error in that case) as a safeguard, because that would be the last line of defense before we accidentally build a bloated app. The safeguard won't work for add to app, from what I understand, because while they use the FGP (so they should be forced to be download the NDK) they don't invoke the flutter tool, and therefore won't invoke the custom error handling of [`gradle_errors.dart`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle_errors.dart) Some details 1. Respects existing values for `externalNativeBuild.cmake.path` for apps that actually use it. 2. Silences some warnings that would otherwise appear for add to app builds or builds that manually invoke gradle: ``` C/C++: CMake Warning (dev) in CMakeLists.txt: C/C++: No project() command is present. The top-level CMakeLists.txt file must C/C++: contain a literal, direct call to the project() command. Add a line of C/C++: code such as C/C++: project(ProjectName) C/C++: near the top of the file, but after cmake_minimum_required(). C/C++: CMake is pretending there is a "project(Project)" command on the first C/C++: line. C/C++: This warning is for project developers. Use -Wno-dev to suppress it. C/C++: CMake Warning: C/C++: Manually-specified variables were not used by the project: C/C++: CMAKE_EXPORT_COMPILE_COMMANDS C/C++: CMAKE_LIBRARY_OUTPUT_DIRECTORY C/C++: CMAKE_RUNTIME_OUTPUT_DIRECTORY ``` 3. Our ci installs the NDK at an abnormal place that AGP can't find without help. I've modified all the `build.gradle`s that we have checked in to point to the pre-installed path. **But some of our tests make a new app from the templates, and those tests will now start downloading the NDK** (as they won't be able to find it at it's current path from templates). We could resolve this by actually fixing #136666. This would be a very significant lift from what I understand - we rely on this hardcoding in a lot of places in our infra. Fixes #155576 ## 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. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [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 <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <[email protected]>
1 parent 99786b4 commit 5cd440f

File tree

42 files changed

+14
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+14
-382
lines changed

.ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5503,7 +5503,7 @@ targets:
55035503
add_recipes_cq: "true"
55045504
dependencies: >-
55055505
[
5506-
{"dependency": "android_sdk", "version": "version:35v1"},
5506+
{"dependency": "android_sdk", "version": "version:33v6"},
55075507
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
55085508
{"dependency": "open_jdk", "version": "version:17"},
55095509
{"dependency": "goldctl", "version": "git_revision:2387d6fff449587eecbb7e45b2692ca0710b63b9"},
@@ -5521,7 +5521,7 @@ targets:
55215521
add_recipes_cq: "true"
55225522
dependencies: >-
55235523
[
5524-
{"dependency": "android_sdk", "version": "version:35v1"},
5524+
{"dependency": "android_sdk", "version": "version:33v6"},
55255525
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
55265526
{"dependency": "open_jdk", "version": "version:17"},
55275527
{"dependency": "goldctl", "version": "git_revision:2387d6fff449587eecbb7e45b2692ca0710b63b9"},
@@ -5539,7 +5539,7 @@ targets:
55395539
add_recipes_cq: "true"
55405540
dependencies: >-
55415541
[
5542-
{"dependency": "android_sdk", "version": "version:35v1"},
5542+
{"dependency": "android_sdk", "version": "version:33v6"},
55435543
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
55445544
{"dependency": "open_jdk", "version": "version:17"},
55455545
{"dependency": "goldctl", "version": "git_revision:2387d6fff449587eecbb7e45b2692ca0710b63b9"},

dev/a11y_assessments/android/app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,7 @@ if (keystorePropertiesFile.exists()) {
3535
android {
3636
namespace "com.example.a11y_assessments"
3737
compileSdk flutter.compileSdkVersion
38-
39-
// Flutter's CI installs the NDK at a non-standard path.
40-
// This non-standard structure is initially created by
41-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
42-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
43-
if (systemNdkPath != null) {
44-
ndkVersion = flutter.ndkVersion
45-
ndkPath = systemNdkPath
46-
}
38+
ndkVersion flutter.ndkVersion
4739

4840
compileOptions {
4941
sourceCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/complex_layout/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "com.yourcompany.complexLayout"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_11
4334
targetCompatibility JavaVersion.VERSION_11

dev/benchmarks/macrobenchmarks/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "com.example.macrobenchmarks"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/microbenchmarks/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "com.yourcompany.microbenchmarks"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/multiple_flutters/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ android {
1616
namespace "dev.flutter.multipleflutters"
1717
compileSdk 34
1818

19-
// Flutter's CI installs the NDK at a non-standard path.
20-
// This non-standard structure is initially created by
21-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
22-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
23-
if (systemNdkPath != null) {
24-
ndkVersion = "26.3.11579264" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
25-
ndkPath = systemNdkPath
26-
}
27-
2819
compileOptions {
2920
sourceCompatibility JavaVersion.VERSION_1_8
3021
targetCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/platform_views_layout/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "dev.benchmarks.platform_views_layout"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "dev.benchmarks.platform_views_layout_hybrid_composition"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/benchmarks/test_apps/stocks/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace "io.flutter.examples.stocks"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/devicelab/bin/tasks/gradle_desugar_classes_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Future<void> main() async {
1515
try {
1616
await runProjectTest((FlutterProject flutterProject) async {
1717
section('APK contains plugin classes');
18-
await flutterProject.setMinSdkVersion(21);
18+
await flutterProject.setMinSdkVersion(20);
1919
await flutterProject.addPlugin('google_maps_flutter:^2.2.1');
2020

2121
await inDirectory(flutterProject.rootPath, () async {

dev/integration_tests/android_semantics_testing/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ android {
2020
namespace = "com.yourcompany.platforminteraction"
2121
compileSdk flutter.compileSdkVersion
2222

23-
// Flutter's CI installs the NDK at a non-standard path.
24-
// This non-standard structure is initially created by
25-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
26-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
27-
if (systemNdkPath != null) {
28-
ndkVersion = flutter.ndkVersion
29-
ndkPath = systemNdkPath
30-
}
31-
3223
compileOptions {
3324
sourceCompatibility JavaVersion.VERSION_1_8
3425
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/android_verified_input/android/app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ if (flutterVersionName == null) {
2929
android {
3030
namespace "io.flutter.integration.android_verified_input"
3131
compileSdk flutter.compileSdkVersion
32-
33-
// Flutter's CI installs the NDK at a non-standard path.
34-
// This non-standard structure is initially created by
35-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
36-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
37-
if (systemNdkPath != null) {
38-
ndkVersion = flutter.ndkVersion
39-
ndkPath = systemNdkPath
40-
}
32+
ndkVersion flutter.ndkVersion
4133

4234
compileOptions {
4335
sourceCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/android_views/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace = 'io.flutter.integration.platformviews'
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/channels/android/app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ if (flutterVersionName == null) {
2929
android {
3030
namespace "com.example.channels"
3131
compileSdk flutter.compileSdkVersion
32-
33-
// Flutter's CI installs the NDK at a non-standard path.
34-
// This non-standard structure is initially created by
35-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
36-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
37-
if (systemNdkPath != null) {
38-
ndkVersion = flutter.ndkVersion
39-
ndkPath = systemNdkPath
40-
}
32+
ndkVersion flutter.ndkVersion
4133

4234
compileOptions {
4335
sourceCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/deferred_components_test/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ android {
3636
namespace "io.flutter.integration.deferred_components_test"
3737
compileSdk flutter.compileSdkVersion
3838

39-
// Flutter's CI installs the NDK at a non-standard path.
40-
// This non-standard structure is initially created by
41-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
42-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
43-
if (systemNdkPath != null) {
44-
ndkVersion = flutter.ndkVersion
45-
ndkPath = systemNdkPath
46-
}
47-
4839
sourceSets {
4940
main.java.srcDirs += 'src/main/kotlin'
5041
}

dev/integration_tests/deferred_components_test/android/component1/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ android {
2626
namespace "io.flutter.integration.deferred_components_test.component1"
2727
compileSdk 35
2828

29-
// Flutter's CI installs the NDK at a non-standard path.
30-
// This non-standard structure is initially created by
31-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
32-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
33-
if (systemNdkPath != null) {
34-
ndkVersion = "26.3.11579264" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
35-
ndkPath = systemNdkPath
36-
}
37-
3829
sourceSets {
3930
applicationVariants.all { variant ->
4031
main.assets.srcDirs += "${project.layout.buildDirectory.get()}/intermediates/flutter/${variant.name}/deferred_assets"

dev/integration_tests/external_textures/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ android {
1919
namespace = "io.flutter.externalui"
2020
compileSdk flutter.compileSdkVersion
2121

22-
// Flutter's CI installs the NDK at a non-standard path.
23-
// This non-standard structure is initially created by
24-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
25-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
26-
if (systemNdkPath != null) {
27-
ndkVersion = flutter.ndkVersion
28-
ndkPath = systemNdkPath
29-
}
30-
3122
compileOptions {
3223
sourceCompatibility JavaVersion.VERSION_1_8
3324
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/flavors/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ android {
1919
namespace "com.yourcompany.flavors"
2020
compileSdk flutter.compileSdkVersion
2121

22-
// Flutter's CI installs the NDK at a non-standard path.
23-
// This non-standard structure is initially created by
24-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
25-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
26-
if (systemNdkPath != null) {
27-
ndkVersion = flutter.ndkVersion
28-
ndkPath = systemNdkPath
29-
}
30-
3122
compileOptions {
3223
sourceCompatibility JavaVersion.VERSION_1_8
3324
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/flutter_gallery/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ android {
4545
namespace "io.flutter.demo.gallery"
4646
compileSdk flutter.compileSdkVersion
4747

48-
// Flutter's CI installs the NDK at a non-standard path.
49-
// This non-standard structure is initially created by
50-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
51-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
52-
if (systemNdkPath != null) {
53-
ndkVersion = flutter.ndkVersion
54-
ndkPath = systemNdkPath
55-
}
56-
5748
compileOptions {
5849
sourceCompatibility JavaVersion.VERSION_1_8
5950
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ android {
2222
namespace = "com.yourcompany.flavors"
2323
compileSdk 34
2424

25-
// Flutter's CI installs the NDK at a non-standard path.
26-
// This non-standard structure is initially created by
27-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
28-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
29-
if (systemNdkPath != null) {
30-
ndkVersion = flutter.ndkVersion
31-
ndkPath = systemNdkPath
32-
}
33-
3425
compileOptions {
3526
sourceCompatibility JavaVersion.VERSION_1_8
3627
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/hybrid_android_views/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ android {
2929
namespace = "io.flutter.integration.platformviews"
3030
compileSdk flutter.compileSdkVersion
3131

32-
// Flutter's CI installs the NDK at a non-standard path.
33-
// This non-standard structure is initially created by
34-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
35-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
36-
if (systemNdkPath != null) {
37-
ndkVersion = flutter.ndkVersion
38-
ndkPath = systemNdkPath
39-
}
40-
4132
compileOptions {
4233
sourceCompatibility JavaVersion.VERSION_1_8
4334
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ android {
88
namespace = "io.flutter.addtoapp"
99
compileSdk 34
1010

11-
// Flutter's CI installs the NDK at a non-standard path.
12-
// This non-standard structure is initially created by
13-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
14-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
15-
if (systemNdkPath != null) {
16-
ndkVersion = "26.3.11579264" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
17-
ndkPath = systemNdkPath
18-
}
19-
2011
compileOptions {
2112
sourceCompatibility JavaVersion.VERSION_1_8
2213
targetCompatibility JavaVersion.VERSION_1_8

dev/integration_tests/native_driver_test/android/app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ plugins {
1212
android {
1313
namespace = "com.example.native_driver_test"
1414
compileSdk = flutter.compileSdkVersion
15-
16-
// Flutter's CI installs the NDK at a non-standard path.
17-
// This non-standard structure is initially created by
18-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
19-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
20-
if (systemNdkPath != null) {
21-
ndkVersion = flutter.ndkVersion
22-
ndkPath = systemNdkPath
23-
}
15+
ndkVersion = flutter.ndkVersion
2416

2517
compileOptions {
2618
sourceCompatibility = JavaVersion.VERSION_1_8

dev/integration_tests/non_nullable/android/app/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ android {
3030
namespace = "com.example.non_nullable"
3131
compileSdk flutter.compileSdkVersion
3232

33-
// Flutter's CI installs the NDK at a non-standard path.
34-
// This non-standard structure is initially created by
35-
// https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh.
36-
String systemNdkPath = System.getenv("ANDROID_NDK_PATH")
37-
if (systemNdkPath != null) {
38-
ndkVersion = flutter.ndkVersion
39-
ndkPath = systemNdkPath
40-
}
41-
4233
compileOptions {
4334
sourceCompatibility JavaVersion.VERSION_1_8
4435
targetCompatibility JavaVersion.VERSION_1_8

0 commit comments

Comments
 (0)