From 650a461f672f3de0afcad17f3bf353d29c2e476c Mon Sep 17 00:00:00 2001 From: Luis Pinto Date: Thu, 19 Dec 2024 11:39:57 +0000 Subject: [PATCH] fix signing Signed-off-by: Luis Pinto --- dist/build.gradle | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/dist/build.gradle b/dist/build.gradle index 28f28b19e..20017d037 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -193,11 +193,17 @@ distTar { compression = Compression.GZIP } sourcesDistTar { compression = Compression.GZIP } +artifacts { + archives distZip + archives distTar + archives sourcesDistZip + archives sourcesDistTar +} + if (System.getenv('ENABLE_SIGNING') == 'true') { signing { useGpgCmd() - sign distributions.main.allArtifacts - sign distributions.sources.allArtifacts + sign configurations.archives sign distZip sign distTar sign sourcesDistZip @@ -205,18 +211,18 @@ if (System.getenv('ENABLE_SIGNING') == 'true') { } } -task createChecksums(type: Checksum, dependsOn: [ - 'distZip', - 'distTar', - 'sourcesDistZip', - 'sourcesDistTar', -]) { +task createChecksums(type: Checksum) { + dependsOn tasks.withType(Sign), 'distZip', 'distTar', 'sourcesDistZip', 'sourcesDistTar' + files = distZip.outputs.files + distTar.outputs.files + sourcesDistZip.outputs.files + sourcesDistTar.outputs.files outputDir = new File(project.buildDir, "distributions") algorithm = Checksum.Algorithm.SHA512 } build.dependsOn('createChecksums') +if (System.getenv('ENABLE_SIGNING') == 'true') { + build.dependsOn tasks.withType(Sign) +} task buildBinImage(type: DockerBuildImage) { dependsOn distTar