Skip to content

Instantly share code, notes, and snippets.

@ijo42
Last active September 5, 2020 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijo42/6b215e76269a72f37194b924ddda038e to your computer and use it in GitHub Desktop.
Save ijo42/6b215e76269a72f37194b924ddda038e to your computer and use it in GitHub Desktop.
Sign any jar Groovy Script
task signJar(dependsOn: 'jar',description: 'Let`s Sign JAR.',group: 'Build'){
onlyIf {
project.hasProperty('keyStore')
}
doLast{
println ":$project.name:${name}"
ant.signjar(
jar: jar.archivePath,
alias: project.keyStoreAlias,
keystore: project.keyStore,
storepass: project.keyStorePass,
tsaurl: project.tsaUrl,
verbose: true,
internalsf: true,
preservelastmodified: true
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment