diff --git a/android/build.gradle b/android/build.gradle index 7d07aae..0bd980f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,6 +36,11 @@ def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Keys_" + name]).toInteger() } +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} + def resolveReactNativeDirectory() { def reactNativeLocation = safeExtGet("REACT_NATIVE_NODE_MODULES_DIR", null) if (reactNativeLocation != null) { @@ -103,7 +108,6 @@ if(!found) { def nodeModulesPath = nodeModulesDir.toString().replace("\\", "/") def reactNativePath = reactNativeDir.toString().replace("\\", "/") - def supportsNamespace() { def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') def major = parsed[0].toInteger() @@ -138,7 +142,7 @@ android { externalNativeBuild { cmake { cppFlags "-fexceptions", "-frtti", "-std=c++1y", "-DONANDROID" - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' + abiFilters (*reactNativeArchitectures()) arguments '-DANDROID_STL=c++_shared', "-DNODE_MODULES_DIR=${nodeModulesPath}", "-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}"