Created
October 25, 2013 06:57
-
-
Save Lien/7150434 to your computer and use it in GitHub Desktop.
Simple gradle sign jar task using ant task.
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
task signJar << { | |
description = "Signs JAR" | |
def config = loadProperties(project.ext.keystorePropsFilename) | |
ant.signjar(jar: project.ext.jarToSign, | |
alias: config.key.alias, | |
keystore: config.key.store, | |
storepass: config.key.'store.password', | |
keypass: config.key.'alias.password') | |
} | |
def loadProperties(propsFilename) { | |
def props = new Properties() | |
new File(propsFilename).withInputStream { | |
stream -> props.load(stream) | |
} | |
return new ConfigSlurper().parse(props) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment