Skip to content

Instantly share code, notes, and snippets.

@enginebai
Created August 3, 2020 14:00
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 enginebai/043d2a2f04f3a06a6f7da3e31892724a to your computer and use it in GitHub Desktop.
Save enginebai/043d2a2f04f3a06a6f7da3e31892724a to your computer and use it in GitHub Desktop.
MovieHunt blog part2. productFlavors
object Config {
const val API_ROOT = "\"https://api.themoviedb.org/3/\""
const val STAGING_API_ROOT = "\"https://staging-api.themoviedb.org/3/\""
}
productFlavors {
create("staging") {
buildConfigField("String", "API_ROOT", Config.STAGING_API_ROOT)
}
create("production") {
buildConfigField("String", "API_ROOT", Config.API_ROOT)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment