Skip to content

Instantly share code, notes, and snippets.

@lesleh
Last active August 29, 2015 13:57
Show Gist options
  • Save lesleh/9454937 to your computer and use it in GitHub Desktop.
Save lesleh/9454937 to your computer and use it in GitHub Desktop.
APK signing configuration for Android Gradle projects
// APK signing
def signingPropFile = new File(project.rootDir, "signing.properties")
if(signingPropFile.exists()) {
Properties props = new Properties()
props.load(new FileInputStream(signingPropFile))
android {
signingConfigs {
release {
storeFile file(props['signing.keystore'])
storePassword props['signing.keystore_password']
keyAlias props['signing.alias']
keyPassword props['signing.alias_password']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
}
signing.keystore=example.keystore
signing.keystore_password=my_password
signing.alias=release
signing.alias_password=my_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment