Skip to content

Commit 69c368c

Browse files
committed
chore: configure multiple APKs for ABIs
1 parent 8a53858 commit 69c368c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

android/app/build.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ android {
114114
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
115115
}
116116
}
117+
splits {
118+
// Configures multiple APKs based on ABI.
119+
abi {
120+
enable true
121+
// Resets the list of ABIs for Gradle to create APKs for to none.
122+
reset()
123+
// Specifies a list of ABIs for Gradle to create APKs for.
124+
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
125+
// Specifies to also generate a universal APK that includes all ABIs.
126+
universalApk true
127+
}
128+
}
117129
packagingOptions {
118130
pickFirst 'lib/x86/libcrypto.so'
119131
pickFirst 'lib/x86_64/libcrypto.so'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"tsc:check": "tsc -p tsconfig.json --noEmit",
2323
"clean": "yarn clean:rn && yarn clean:ios && yarn clean:android && yarn start --reset-cache",
2424
"clean:rn": "watchman watch-del-all && npx del-cli node_modules && yarn && npx del-cli /tmp/metro-*",
25-
"clean:android": "cd android && npx del-cli build app/build",
25+
"clean:android": "cd android && npx del-cli build app/build app/release",
2626
"clean:ios": "cd ios && npx del-cli Pods Podfile.lock build && pod deintegrate && pod install",
2727
"bundle": "yarn clean:android && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.jsbundle --assets-dest android/app/build/intermediates/res/merged/release/ && cd android && ./gradlew assembleRelease --no-daemon",
2828
"prepare": "husky",

0 commit comments

Comments
 (0)