Skip to content

Instantly share code, notes, and snippets.

@twaddington
Created October 12, 2017 02:19
Show Gist options
  • Save twaddington/c59a8957facf47b81249799a5664b963 to your computer and use it in GitHub Desktop.
Save twaddington/c59a8957facf47b81249799a5664b963 to your computer and use it in GitHub Desktop.
Loading keystore signing info into Gradle
// Load release signing info from keystore.properties
def keystoreProps = new Properties()
keystoreProps.load(new FileInputStream(rootProject.file('keystore.properties')))
keystoreProps.each { prop ->
if (!project.hasProperty(prop.key)) {
project.ext.set(prop.key, prop.value)
}
}
android {
signingConfigs {
debug {
storeFile file('keystore/debug.jks')
}
release {
storeFile file('keystore/release.jks')
storePassword findProperty('release.storePassword')
keyAlias '{FooBar}'
keyPassword findProperty('release.keyPassword')
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment