Skip to content

Commit ca630b9

Browse files
authored
Merge pull request #269 from zhouzh1/fix/android_cmake_abifilter
fix(android): add reactNativeArchitectures function and update abiFilters to use it in build.gradle file
2 parents 1a3098f + c5a6b9d commit ca630b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

android/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ def getExtOrDefault(name) {
109109
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["OPSQLite" + name]
110110
}
111111

112+
def reactNativeArchitectures() {
113+
def value = project.getProperties().get("reactNativeArchitectures")
114+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
115+
}
116+
112117
android {
113118

114119
compileSdkVersion safeExtGet("compileSdkVersion", 33)
@@ -178,7 +183,7 @@ android {
178183
}
179184

180185
cppFlags "-O2 -frtti -fexceptions -Wall -fstack-protector-all"
181-
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
186+
abiFilters(*reactNativeArchitectures())
182187
arguments "-DANDROID_STL=c++_shared",
183188
"-DSQLITE_FLAGS='$sqliteFlags'",
184189
"-DUSE_SQLCIPHER=${useSQLCipher ? 1 : 0}",

0 commit comments

Comments
 (0)