Secrets and Build Config
Understand how store secrets in local.properties and share the secrets in all the platforms (Android, iOS, Web, Desktop)
# Google Sign in
google_sign_in_web_client_id=buildkonfig {
packageName = "com.appkickstarter.shared"
val props = Properties()
try {
props.load(file("../local.properties").inputStream())
} catch (e: Exception) {
// keys are private and can not be committed to git
}
defaultConfigs {
buildConfigField(
STRING,
"GOOGLE_SIGN_IN_WEB_CLIENT_ID",
props["google_sign_in_web_client_id"]?.toString() ?: ""
)
}
}Last updated