Created
January 12, 2018 09:56
-
-
Save venator85/08c3078dea31cde8697901cab441c25c to your computer and use it in GitHub Desktop.
Gradle task to print APK signing certificate information (e.g. SHA1 hash)
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.applicationVariants.all { variant -> | |
tasks.create(name: "signatureHash${variant.name.capitalize()}", type: Exec) { | |
group "util" | |
commandLine 'keytool', '-exportcert', '-list', '-v', | |
'-alias', variant.signingConfig.keyAlias, | |
'-keypass', variant.signingConfig.keyPassword, | |
'-keystore', variant.signingConfig.storeFile, | |
'-storepass', variant.signingConfig.storePassword | |
doFirst { | |
println ":: Signing config for variant ${variant.name} is: ${variant.signingConfig.name}\n" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment