Skip to content

Commit 30ed25f

Browse files
committed
Better way to check ndk version.
1 parent 0bae40d commit 30ed25f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

android_build_files/android_abis.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ android {
2727
}
2828
}
2929

30-
if (System.getenv('NDK_ROOT') && System.getenv('NDK_ROOT').contains('r16b')) {
31-
// Additional ABIs are added to the list when building using NDK r16b only.
30+
if (android.ndkVersion.startsWith("16.") || android.ndkVersion.startsWith("11.")) {
31+
// Deprecated ABIs are added to the list when building using older NDKs only.
32+
// Rather than an exhaustive list of older NDK versions, we only support r16b and r11c.
3233
android.defaultConfig.ndk.abiFilters.add("armeabi")
3334
android.defaultConfig.ndk.abiFilters.add("mips")
3435
android.defaultConfig.ndk.abiFilters.add("mips64")
36+
if (android.ndkVersion.startsWith("11.")) {
37+
android.defaultConfig.ndk.abiFilters.add("armeaby-v7a-hard") // Removed after NDK r11c.
38+
}
3539
}

0 commit comments

Comments
 (0)