Skip to content

Instantly share code, notes, and snippets.

@alvindizon
Last active August 13, 2020 00:44
Show Gist options
  • Save alvindizon/0cccfe98e8e74e949c929eafab50be93 to your computer and use it in GitHub Desktop.
Save alvindizon/0cccfe98e8e74e949c929eafab50be93 to your computer and use it in GitHub Desktop.
Android flavors
defaultConfig {
applicationId "com.internal.app"
...
}
buildTypes {
debug{
...
}
release {
...
}
}
...
flavorDimensions 'mode', 'client'
productFlavors {
mock {
dimension = 'mode'
}
prod {
dimension = 'mode'
}
internal {
dimension = 'client'
}
client2 {
dimension = 'client'
applicationId = 'com.client2.app'
}
}
// creates the following build variants:
// [internal, client2][mock, prod][debug, release]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment