From 9357f139e6c9594b1746c3672eb111d1a7c0c529 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Tue, 19 Feb 2019 11:29:56 +0000 Subject: [PATCH] android: build native modules for every arch Builds native modules for every architecture if abiFilter is not defined for the project. --- android/build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 951e882..2afe76d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -188,7 +188,13 @@ if ("1".equals(shouldRebuildNativeModules)) { } GenerateNodeProjectAssetsLists.dependsOn "ApplyPatchScriptToModules" - android.defaultConfig.ndk.abiFilters.each { abi_name -> + def nativeModulesABIs = android.defaultConfig.ndk.abiFilters; + if (nativeModulesABIs == null) { + // No abiFilter is defined for the build. Build native modules for eevery architecture. + nativeModulesABIs = ["armeabi-v7a", "x86", "arm64-v8a", "x86_64"] as Set; + } + + nativeModulesABIs.each { abi_name -> String temp_arch = { switch (abi_name) { case 'armeabi-v7a':