Skip to content

Instantly share code, notes, and snippets.

@umarhussain15
Created October 23, 2018 17:33
Show Gist options
  • Save umarhussain15/1d36c7bee08088e02727adf30f259611 to your computer and use it in GitHub Desktop.
Save umarhussain15/1d36c7bee08088e02727adf30f259611 to your computer and use it in GitHub Desktop.
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