Skip to content

Instantly share code, notes, and snippets.

@lordcodes
Created February 16, 2020 21:31
Show Gist options
  • Save lordcodes/161be60add84280691f79e9cbec77bab to your computer and use it in GitHub Desktop.
Save lordcodes/161be60add84280691f79e9cbec77bab to your computer and use it in GitHub Desktop.
Code for the article: "Protecting secrets in an Android project"
defaultConfig {
buildConfigField(
"String",
"AUTH_CLIENT_SECRET",
buildConfigProperty("GameCatalogueApp_AuthClientSecret")
)
resValue(
"string",
"pusher_key",
propertyOrEmpty("GameCatalogueApp_Pusher_APIKey")
)
}
fun Project.buildConfigProperty(name: String) = "\"${propertyOrEmpty(name)}\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment