Split apks by architecture when building

Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
Jays2Kings 2022-04-19 18:46:45 -04:00
parent b13777c2da
commit 06b2db1f60
2 changed files with 25 additions and 2 deletions

View file

@ -27,6 +27,8 @@ fun runCommand(command: String): String {
return String(byteOut.toByteArray()).trim()
}
val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86")
android {
compileSdk = AndroidVersions.compileSdk
@ -45,9 +47,19 @@ android {
buildConfigField("Boolean", "INCLUDE_UPDATER", "false")
ndk {
abiFilters += setOf("armeabi-v7a", "arm64-v8a", "x86")
abiFilters += supportedAbis
}
}
splits {
abi {
isEnable = true
reset()
include(*supportedAbis.toTypedArray())
isUniversalApk = true
}
}
buildTypes {
getByName("debug") {
applicationIdSuffix = ".debugJ2K"