Skip to content

Instantly share code, notes, and snippets.

@bapspatil
Last active September 14, 2022 12:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bapspatil/4b2f36bcb27622deedfea3696a355df9 to your computer and use it in GitHub Desktop.
Save bapspatil/4b2f36bcb27622deedfea3696a355df9 to your computer and use it in GitHub Desktop.
app module's build.gradle file for Android App Bundle
// 'app' module should have the application plugin.
apply plugin: 'com.android.application'
android {
defaultConfig {
...
// Specify the version code, only once for each new version of your app, for your App Bundle
// No need to have different version codes for different APKs generated.
// All split APKs will share the same version code once installed via Google Play.
versionCode 1
versionName "1.0"
...
}
// Add this block and enable/disable the parameters as follows
bundle {
density {
// Different APKs are generated for devices with different screen densities; true by default.
enableSplit true
}
abi {
// Different APKs are generated for devices with different CPU architectures; true by default.
enableSplit true
}
language {
// This is disabled so that the App Bundle does NOT split the APK for each language.
// We're gonna use the same APK for all languages.
enableSplit false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment