Skip to content

Commit

Permalink
Sign the JAR
Browse files Browse the repository at this point in the history
  • Loading branch information
ljfa-ag committed Dec 28, 2017
1 parent b362524 commit 2cb17a4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ plugins {

apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.2.2"
version = "1.2.3"
group= "ljfa.tntutils"
archivesBaseName = "tnt_utilities-mc1.12"

Expand Down Expand Up @@ -72,3 +72,23 @@ processResources {
exclude 'mcmod.info'
}
}

task signJar(type: SignJar, dependsOn: reobfJar) {
// Skips if the keyStore property is missing.
onlyIf {
project.hasProperty('keyStore')
}

// findProperty allows us to reference the property without it existing.
// Using project.propName would cause the script to fail validation if
// the property did not exist.
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}

// Runs this task automatically when reobfJar is ran.
reobfJar.finalizedBy signJar

0 comments on commit 2cb17a4

Please sign in to comment.