Skip to content

Commit dcc7ba7

Browse files
authored
Explicitly set ndkVersion to Flutter's (#247)
Without this, webcrypto.dart uses AGP's default NDK version, which can be different from Flutter's preferred NDK version. Apart from causing builds to download multiple NDKs needlessly, this also causes APKs to not use 16 KB page sizes. Tested by building an APK and opening it in Android Studio's APK analyzer.
1 parent 673b776 commit dcc7ba7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ android {
2828
namespace 'dev.google.webcrypto'
2929

3030
compileSdk = flutter.compileSdkVersion
31+
ndkVersion = flutter.ndkVersion
3132

3233
// We depend on cmake for the native parts.
3334
externalNativeBuild {

0 commit comments

Comments
 (0)