Skip to content

Commit

Permalink
sign and checksum tar and zip
Browse files Browse the repository at this point in the history
  • Loading branch information
crotwell committed Mar 17, 2021
1 parent af6e9f7 commit 6b41bfa
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import java.util.Date;
import org.gradle.crypto.checksum.Checksum

plugins {
id("edu.sc.seis.version-class") version "1.2.0"
id("org.gradle.crypto.checksum") version "1.2.0"
"java"
eclipse
"project-report"
Expand Down Expand Up @@ -164,14 +166,22 @@ tasks.register<Tar>("tarDist") {
}


tasks.register<Checksum>("checksumDist") {
dependsOn("tarBin")
dependsOn("tarDist")
dependsOn("zipDist")
files = tasks.getByName("tarBin").outputs.files + tasks.getByName("tarDist").outputs.files + tasks.getByName("zipDist").outputs.files
outputDir=File(project.buildDir, "distributions")
algorithm = Checksum.Algorithm.SHA256
}

tasks.register<Zip>("zipDist") {
dependsOn("explodeDist")
into(dirName) {
with( distFiles)
}
}


publishing {
publications {
create<MavenPublication>("mavenJava") {
Expand Down Expand Up @@ -223,6 +233,9 @@ publishing {

signing {
sign(publishing.publications["mavenJava"])
sign(tasks.getByName("tarDist"))
sign(tasks.getByName("zipDist"))
sign(tasks.getByName("tarBin"))
}

tasks.register("createRunScripts"){}
Expand Down Expand Up @@ -291,7 +304,10 @@ tasks.register<Sync>("copyCmdLineTestFiles") {
dependsOn("genCmdLineTestFiles")
}

tasks.get("assemble").dependsOn(tasks.get("tarDist"))
tasks.get("assemble").dependsOn(tasks.get("signTarBin"))
tasks.get("assemble").dependsOn(tasks.get("signTarDist"))
tasks.get("assemble").dependsOn(tasks.get("signZipDist"))
tasks.get("assemble").dependsOn(tasks.get("checksumDist"))

val generatedSrcDir = file("$buildDir/generated-src/StdModels")
val resourceDir = File(generatedSrcDir, "/resources")
Expand Down

0 comments on commit 6b41bfa

Please sign in to comment.