Created
October 12, 2017 02:19
-
-
Save twaddington/c59a8957facf47b81249799a5664b963 to your computer and use it in GitHub Desktop.
Loading keystore signing info into Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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