From 902f0fd83e6221022e5776d1e143265bc3db46b4 Mon Sep 17 00:00:00 2001 From: "Daniel Doubrovkine (dB.)" Date: Wed, 6 Oct 2021 17:10:21 -0400 Subject: [PATCH] Publish source and javadoc checksums. (#81) Signed-off-by: dblock --- build.gradle | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index b0a720cf..92f71cc5 100644 --- a/build.gradle +++ b/build.gradle @@ -148,11 +148,6 @@ shadowJar { classifier = null } -shadowJar.doLast { - ant.checksum algorithm: 'md5', file: it.archivePath - ant.checksum algorithm: 'sha1', file: it.archivePath -} - task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allJava @@ -163,6 +158,15 @@ task javadocJar(type: Jar) { from javadoc.destinationDir } +tasks.withType(Jar) { task -> + task.doLast { + ant.checksum algorithm: 'md5', file: it.archivePath + ant.checksum algorithm: 'sha1', file: it.archivePath + ant.checksum algorithm: 'sha-256', file: it.archivePath, fileext: '.sha256' + ant.checksum algorithm: 'sha-512', file: it.archivePath, fileext: '.sha512' + } +} + publishing { publications { shadow(MavenPublication) {