Skip to content

Commit

Permalink
Publish source and javadoc checksums. (opensearch-project#81)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@dblock.org>
  • Loading branch information
dblock authored Oct 6, 2021
1 parent a97d983 commit 902f0fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 902f0fd

Please sign in to comment.