Needed to rework the publish as the signed portion wasn't being

uploaded; thank goodness others had working samples to look at!
This commit is contained in:
Rob Greene 2022-01-22 20:55:06 -06:00
parent 54aecd1eea
commit d8cbd263dd

View File

@ -38,23 +38,22 @@ javadoc {
options.addStringOption('Xdoclint:none', '-quiet') options.addStringOption('Xdoclint:none', '-quiet')
} }
java { task javadocJar(type: Jar) {
withSourcesJar() classifier = 'javadoc'
withJavadocJar() from javadoc
} }
signing { task sourcesJar(type: Jar) {
// Only sign if we're uploading... classifier = 'sources'
required { from sourceSets.main.allSource
isReleaseVersion && gradle.taskGraph.hasTask("publish")
}
sign configurations.archives
} }
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java from components.java
artifact sourcesJar
artifact javadocJar
pom { pom {
groupId = "net.sf.applecommander" groupId = "net.sf.applecommander"
artifactId = "AppleCommander" artifactId = "AppleCommander"
@ -94,3 +93,7 @@ publishing {
} }
} }
} }
signing {
sign publishing.publications.mavenJava
}