Skip to content

Instantly share code, notes, and snippets.

@smhdk
Created March 19, 2018 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smhdk/7e535a47f45296270f4f8cfe339883d2 to your computer and use it in GitHub Desktop.
Save smhdk/7e535a47f45296270f4f8cfe339883d2 to your computer and use it in GitHub Desktop.
Module build.gradle Build Type example
android {
defaultConfig {
manifestPlaceholders = [hostName:"www.example.com"]
...
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
// The `initWith` property allows you to copy configurations from other build types, then configure just the settings you want to change. This one copies the debug build type, and then changes the manifest placeholder and applicationID.
staging {
initWith debug
manifestPlaceholders = [hostName:"internal.example.com"]
applicationIdSuffix ".debugStaging"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment