Skip to content

Instantly share code, notes, and snippets.

@bastionkid
Created June 13, 2023 07:26
Show Gist options
  • Select an option

  • Save bastionkid/282c2e482539c4d0c70a6e73e6bed22e to your computer and use it in GitHub Desktop.

Select an option

Save bastionkid/282c2e482539c4d0c70a6e73e6bed22e to your computer and use it in GitHub Desktop.
abi splits configuration
android {
...
splits {
abi {
val onlyInclude = fun(abiTag: kotlin.String) {
// Enables building multiple APKs per ABI.
isEnable = true
// By default all ABIs are included, so use reset() and include to specify that
// you only want APKs for e.g. arm64-v8a, armeabi-v7a & x86_64.
// Resets the list of ABIs for Gradle to create APKs for to none.
reset()
include(abiTag)
}
when (properties["targetAbi"]) {
Abi.ARM64_V8A.tag -> onlyInclude(Abi.ARM64_V8A.tag)
Abi.ARMEABI_V7A.tag -> onlyInclude(Abi.ARMEABI_V7A.tag)
Abi.X86_64.tag -> onlyInclude(Abi.X86_64.tag)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment