Skip to content

Commit

Permalink
Publish source and javadoc checksums. (#81)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
Signed-off-by: Zelin Hao <[email protected]>
  • Loading branch information
dblock authored and zelinh committed Aug 18, 2022
1 parent c7f9a5f commit 7f75cbb
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 7f75cbb

Please sign in to comment.