build: createAirGapZip tasks now each depend on signJar (which depends on build) to ensure the jar is signed before it's built into air gap zips
@@ -160,8 +160,18 @@ String findGradle() {
return System.getProperty("os.name").toLowerCase().contains("windows") ? '--detect.gradle.path=gradlew.bat' : '--detect.gradle.path=gradlew';
}
-task createAirGapZip(type: JavaExec) {
+task signJar() {
dependsOn build
+ finalizedBy 'verifyJar'
+ doLast {
+ exec {
+ commandLine 'jarsigner', '-tsa', 'http://rfc3161timestamp.globalsign.com/advanced', '-storetype', 'pkcs12', '-storepass', "${jarSigningKeystorePassword}", '-keystore', "${jarSigningKeystorePath}", "${createArtifactName()}", "${jarSigningCertificateAlias}"
+ }
+ }
+}
+
+task createAirGapZip(type: JavaExec) {
+ dependsOn signJar
classpath = files(createArtifactName())
classpath += sourceSets.main.runtimeClasspath
@@ -187,7 +197,7 @@ task publishAirGapZip() {
}
task createAirGapZipWithoutDocker(type: JavaExec) {
- dependsOn build
+ dependsOn signJar
classpath = files(createArtifactName())
classpath += sourceSets.main.runtimeClasspath
@@ -218,16 +228,6 @@ task publishAirGapZipWithoutDocker() {
}
}
-task signJar() {
- dependsOn build
- finalizedBy 'verifyJar'
- doLast {
- exec {
- commandLine 'jarsigner', '-tsa', 'http://rfc3161timestamp.globalsign.com/advanced', '-storetype', 'pkcs12', '-storepass', "${jarSigningKeystorePassword}", '-keystore', "${jarSigningKeystorePath}", "${createArtifactName()}", "${jarSigningCertificateAlias}"
- }
- }
-}
-
task verifyJar() {
dependsOn signJar
doLast {
