Created
November 9, 2016 18:41
-
-
Save iamcxa/bf332199097e23e124d7ef2c528d05ef to your computer and use it in GitHub Desktop.
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
//rootProject.file(): 取得根目錄中的檔案 | |
def ksFile = rootProject.file('keystore.properties') | |
def props = new Properties(); | |
if (ksFile.canRead()) { | |
props.load(new FileInputStream(ksFile)) | |
if (props != null) { | |
android.signingConfigs.sign.storeFile file(props['KEYSTORE_FILE']) | |
android.signingConfigs.sign.storePassword props['KEYSTORE_PASSWORD'] | |
android.signingConfigs.sign.keyAlias props['KEYSTORE_ALIAS'] | |
android.signingConfigs.sign.keyPassword props['KEYSTORE_ALIAS_PASSWORD'] | |
} else { | |
println 'some entries in \'keystore.properties\' not found!' | |
} | |
} else { | |
println '\'keystore.properties\' not found!' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment