File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,6 @@ publishing {
9999 artifact javadocsJar
100100
101101 if (signing. required) {
102- // Sign the pom.xml.
103- pom. withXml {
104- writeTo(project. ext. pomFile)
105- def pomAscFile = signing. sign(project. ext. pomFile). signatureFiles[0 ]
106- artifact(pomAscFile) {
107- classifier = null
108- extension = ' pom.asc'
109- }
110- project. ext. pomFile. delete()
111- }
112-
113102 // Sign the artifacts.
114103 project. tasks. signArchives. signatureFiles. each {
115104 artifact(it) {
@@ -125,6 +114,23 @@ publishing {
125114 }
126115}
127116
117+ if (signing. required) {
118+ project. afterEvaluate {
119+ // Sign the pom.xml.
120+ publishing. publications. lib(MavenPublication ) {
121+ pom. withXml {
122+ writeTo(project. ext. pomFile)
123+ def pomAscFile = signing. sign(project. ext. pomFile). signatureFiles[0 ]
124+ artifact(pomAscFile) {
125+ classifier = null
126+ extension = ' pom.asc'
127+ }
128+ project. ext. pomFile. delete()
129+ }
130+ }
131+ }
132+ }
133+
128134model {
129135 tasks. publishLibPublicationToMavenLocal {
130136 dependsOn(project. tasks. signArchives)
You can’t perform that action at this time.
0 commit comments