Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple gradle sign jar task using ant task.
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
You can’t perform that action at this time.