Created
August 26, 2015 12:34
-
-
Save bholota/b9a32e4935399b4419ee to your computer and use it in GitHub Desktop.
siging config
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
android { | |
signingConfigs { | |
release { | |
storeFile file(fileConfig['keystore_dir']) | |
storePassword fileConfig['keystore_password'] | |
keyAlias fileConfig['key_alias'] | |
keyPassword fileConfig['key_password'] | |
} | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
signingConfig signingConfigs.release | |
buildConfigField "String", URL, URL_PRODUCTION | |
buildConfigField "boolean", "MOCKUP", "false" | |
} | |
} | |
} | |
def getReleaseSigningConfig() { | |
Properties p = new Properties() | |
FileInputStream fileConfigIS; | |
try { | |
fileConfigIS = new FileInputStream(file("../signing.properties")); | |
p.load(fileConfigIS); | |
} catch (FileNotFoundException ex) { | |
def debugKeyDir = System.getenv('HOME') + "/.android/debug.keystore" | |
p.setProperty('keystore_dir', debugKeyDir) | |
p.setProperty('key_alias', 'androiddebugkey') | |
p.setProperty('keystore_password', 'android') | |
p.setProperty('key_password', 'android') | |
logger.warn("Using default debug key instead of release key, missing release key configuration file!") | |
} | |
return p; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment