Last active
August 29, 2020 07:59
-
-
Save igorwojda/5b4e9348836dc2446c3fa07c838ed1b5 to your computer and use it in GitHub Desktop.
Configure apk split for release builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
splits { | |
abi { | |
def isReleaseBuild = false | |
gradle.startParameter.taskNames.find { | |
// Enable split for release builds in different build flavors | |
// (assemblePaidRelease, assembleFreeRelease, etc.). | |
if (it ==~ /:app:assemble.*Release/) { | |
isReleaseBuild = true | |
return true // break | |
} | |
return false // continue | |
} | |
// Enables building multiple APKs per ABI. | |
enable isReleaseBuild | |
//... | |
} | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment