Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gradle configuration using a local properties files to load credentials
//...
def keystorePropertiesFile = file("../keystore.properties");
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
release {
storeFile = file(keystoreProperties['storeFile'])
storePassword = keystoreProperties['storePassword']
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
}
debug {
storeFile = file(keystoreProperties['storeFile'])
storePassword = keystoreProperties['storePassword']
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
}
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment