From a9cb252ecd261331f2fa754f44d9886de9440bdf Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 1 Jul 2018 04:04:56 +0200 Subject: [PATCH] Added jar signing (untested) --- .gitignore | 4 ++++ build.gradle | 18 ++++++++++++++++++ src/main/java/cr0s/warpdrive/WarpDrive.java | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d8c0d10b..7be84fd4 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ dependencies *.DS_Store classes + +gradle\.properties +LemADEC\.jks +LemADEC\.jks\.old diff --git a/build.gradle b/build.gradle index 8ea2627f..47c09a5e 100644 --- a/build.gradle +++ b/build.gradle @@ -169,6 +169,24 @@ jar { destinationDir = file 'output' } +task signJar(type: SignJar) { + onlyIf { // Skip the task if our secret data isn't available + project.hasProperty('keyStore') + } + dependsOn reobfJar + + if (project.hasProperty('keyStore')) { // This needs to be a path to the keystore file + keyStore = project.keyStore + alias = project.alias + storePass = project.storePass + keyPass = project.keyPass + inputFile = jar.archivePath + outputFile = jar.archivePath + } +} + +build.dependsOn signJar + idea { module { inheritOutputDirs = true diff --git a/src/main/java/cr0s/warpdrive/WarpDrive.java b/src/main/java/cr0s/warpdrive/WarpDrive.java index b35a628b..b081ca9d 100644 --- a/src/main/java/cr0s/warpdrive/WarpDrive.java +++ b/src/main/java/cr0s/warpdrive/WarpDrive.java @@ -165,7 +165,8 @@ import javax.annotation.Nullable; + "after:appliedenergistics;" + "after:enderio;" + "after:defensetech;" - + "after:icbmclassic;" + + "after:icbmclassic;", + certificateFingerprint = "f7be6b40743c6a8205df86c5e57547d578605d8a" ) public class WarpDrive { public static final String MODID = "warpdrive";