Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Re-specify the ndk version in various test apps, to prevent ndk download#183134

Open
gmackall wants to merge 4 commits intoflutter:masterfrom
gmackall:more_more_flake_elim
Open

Re-specify the ndk version in various test apps, to prevent ndk download#183134
gmackall wants to merge 4 commits intoflutter:masterfrom
gmackall:more_more_flake_elim

Conversation

@gmackall
Copy link
Member

@gmackall gmackall commented Mar 2, 2026

When I landed #179920 I was operating under the assumption that if there was no ndkVersion specified in the android {} block, AGP would use whatever NDK was present. This is not true - AGP has a default NDK version (dependent on your AGP version), and it checks only for that version (which is not the same as our pre-installed version in almost all (all?) cases).

So we should re-add the ndkVersion = flutter.ndkVersion. This is also present in our templates, so it isn't a ci specific hack. It will align the version that AGP looks for with the version we are hosting on CI, so we will stop downloading.

@gmackall gmackall marked this pull request as ready for review March 2, 2026 21:21
@gmackall gmackall requested a review from a team March 2, 2026 21:22
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Gradle configuration for the android_engine_test. A single line is added to dev/integration_tests/android_engine_test/android/app/build.gradle to explicitly set the ndkVersion to flutter.ndkVersion. This ensures that the build uses the NDK version specified by the Flutter SDK, preventing Gradle from downloading a default version and improving build reliability, especially in CI environments.

@gmackall gmackall changed the title Stop downloading the ndk in android_engine_test Stop downloading the ndk in android_engine_test and hybrid_android_views test Mar 2, 2026
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin labels Mar 3, 2026
@gmackall gmackall changed the title Stop downloading the ndk in android_engine_test and hybrid_android_views test Re-specify the ndk version in various test apps, to prevent ndk download Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant