@@ -27,27 +27,24 @@ subprojects {
2727 }
2828 }
2929 }
30- // to test local publishing use ./gradlew publish and comment nexusPublishing
31- // repositories {
32- // maven {
33- // def releasesRepoUrl = "$System.env.HOME/repos/releases"
34- // def snapshotsRepoUrl = "$System.env.HOME/repos/snapshots"
35- // url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
36- // }
37- // }
38- }
3930
40- if (project. hasProperty(' signing.keyId' )) {
41- signing {
42- sign publishing. publications. mavenJava
43- }
31+ // To test local publishing use ./gradlew publish and comment nexusPublishing
32+ //
33+ // repositories {
34+ // maven {
35+ // def releasesRepoUrl = "$System.env.HOME/repos/releases"
36+ // def snapshotsRepoUrl = "$System.env.HOME/repos/snapshots"
37+ // url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
38+ // }
39+ // }
4440 }
4541
46- // customize the pom in afterEvaluate to allow subproject build.gradle files to
47- // contribute the description field
42+ // Customize the pom for all publications and sign all, in afterEvaluate so
43+ // subproject build.gradle files can contribute (e.g. description) and custom
44+ // publications (e.g. shadow) exist.
4845 afterEvaluate { subproject ->
49- subproject. publishing. publications. mavenJava {
50- pom {
46+ subproject. publishing. publications. withType( MavenPublication ) . each { publication ->
47+ publication . pom {
5148 name = subproject. description
5249 description = subproject. description
5350 url = ' https://github.com/temporalio/sdk-java'
@@ -79,5 +76,12 @@ subprojects {
7976 }
8077 }
8178 }
79+ if (subproject. hasProperty(' signing.keyId' )) {
80+ subproject. signing {
81+ subproject. publishing. publications. withType(MavenPublication ). each { publication ->
82+ sign publication
83+ }
84+ }
85+ }
8286 }
8387}
0 commit comments