Skip to content

Commit

Permalink
chore: configure multiple APKs for ABIs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Jun 14, 2024
1 parent 8a53858 commit 69c368c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
splits {
// Configures multiple APKs based on ABI.
abi {
enable true
// Resets the list of ABIs for Gradle to create APKs for to none.
reset()
// Specifies a list of ABIs for Gradle to create APKs for.
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
// Specifies to also generate a universal APK that includes all ABIs.
universalApk true
}
}
packagingOptions {
pickFirst 'lib/x86/libcrypto.so'
pickFirst 'lib/x86_64/libcrypto.so'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"tsc:check": "tsc -p tsconfig.json --noEmit",
"clean": "yarn clean:rn && yarn clean:ios && yarn clean:android && yarn start --reset-cache",
"clean:rn": "watchman watch-del-all && npx del-cli node_modules && yarn && npx del-cli /tmp/metro-*",
"clean:android": "cd android && npx del-cli build app/build",
"clean:android": "cd android && npx del-cli build app/build app/release",
"clean:ios": "cd ios && npx del-cli Pods Podfile.lock build && pod deintegrate && pod install",
"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",
"prepare": "husky",
Expand Down

0 comments on commit 69c368c

Please sign in to comment.