Created
May 8, 2015 00:05
-
-
Save SleeplessByte/6b615d899f3e5df1bd98 to your computer and use it in GitHub Desktop.
singning.properties configuration in your build.gradle so your credentials are safe(r)
This file contains hidden or 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
File propFile = file('signing.properties'); | |
if (propFile.exists()) { | |
def Properties props = new Properties() | |
props.load(new FileInputStream(propFile)) | |
if (props.containsKey('STORE_FILE') && | |
props.containsKey('STORE_PASSWORD') && | |
props.containsKey('KEY_ALIAS') && | |
props.containsKey('KEY_PASSWORD')) { | |
android.signingConfigs.release.storeFile = file(props['STORE_FILE']) | |
android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] | |
android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] | |
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] | |
} else { | |
android.buildTypes.release.signingConfig = null | |
} | |
} else { | |
android.buildTypes.release.signingConfig = null | |
} | |
/* | |
PLACE AT BOTTOM OF module.build.gradle | |
CREATE FILE signing.properties file | |
STORE_PASSWORD=yourpasswordincleartextetc | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment