Last active
December 31, 2015 14:19
-
-
Save MarkMjw/7999509 to your computer and use it in GitHub Desktop.
Reading the value of keystore from file.
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
allprojects { | |
afterEvaluate { project -> | |
// you should define property in keystore.properties like this : | |
// storePassword="..." | |
// keyPassword="..." | |
// keyAlias="..." | |
// storeFile="..." | |
def propsFile = rootProject.file('keystore.properties') | |
def configName = 'release' | |
if (propsFile.exists() && android.signingConfigs.hasProperty(configName)) { | |
def props = new Properties() | |
props.load(new FileInputStream(propsFile)) | |
android.signingConfigs[configName].storeFile = file(props['storeFile']) | |
android.signingConfigs[configName].storePassword = props['storePassword'] | |
android.signingConfigs[configName].keyAlias = props['keyAlias'] | |
android.signingConfigs[configName].keyPassword = props['keyPassword'] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment