Skip to content

Commit

Permalink
Add reactNativeArchitectures
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Apr 11, 2024
1 parent aa0d9de commit 8e5fd9e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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())
}
}
}
Expand Down

0 comments on commit 8e5fd9e

Please sign in to comment.