From 8e5fd9ed45ed012d429d070271e686d4ec0a4d9a Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Thu, 11 Apr 2024 11:58:47 +0200 Subject: [PATCH] Add `reactNativeArchitectures` --- android/build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c1fe5935..7a700053 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,6 +9,11 @@ buildscript { } } +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} + def isNewArchitectureEnabled() { return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" } @@ -53,12 +58,13 @@ android { minSdkVersion getExtOrIntegerDefault("minSdkVersion") targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - + consumerProguardFiles "proguard-rules.pro" - + externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared", "-DANDROID_TOOLCHAIN=clang" + abiFilters (*reactNativeArchitectures()) } } }