@@ -18,15 +18,20 @@ dependencies {
1818 testImplementation ' pl.pragmatists:JUnitParams:1.1.1'
1919}
2020
21- // Additional tasks for generating source and Javadoc JARs
22- task sourcesJar ( type : Jar ) {
21+ task sourceJar ( type : Jar ) {
22+ classifier " sources "
2323 from sourceSets. main. allJava
24- archiveClassifier. set(' sources' )
2524}
2625
2726task javadocJar (type : Jar , dependsOn : javadoc) {
27+ classifier " javadoc"
2828 from javadoc. destinationDir
29- archiveClassifier. set(' javadoc' )
29+ }
30+
31+ artifacts {
32+ archives jar
33+ archives sourceJar
34+ archives javadocJar
3035}
3136
3237// Configure the publishing block for Maven Central deployment
@@ -36,8 +41,12 @@ publishing {
3641 from components. java
3742
3843 // Attach source and javadoc JARs
39- artifact sourcesJar
40- artifact javadocJar
44+ artifact(sourceJar) {
45+ classifier = ' sources'
46+ }
47+ artifact(javadocJar) {
48+ classifier = ' javadoc'
49+ }
4150
4251 pom {
4352 name = ' ServiceStack.Client'
@@ -95,11 +104,11 @@ publishing {
95104 }
96105}
97106
98- if (project. hasProperty(' signing.keyId ' )) {
107+ if (project. hasProperty(' signing.key ' )) {
99108 println " Signing enabled"
100109 signing {
101110 sign publishing. publications. mavenJava
102- useInMemoryPgpKeys(findProperty(" signing.keyId " ) as String , null )
111+ useInMemoryPgpKeys(findProperty(" signing.key " ) as String , null )
103112 // useGpgCmd(findProperty("signing.secretKeyRingFile"))
104113 }
105114} else {
0 commit comments