Skip to content

Commit 1cf5d77

Browse files
committed
sign pom only when uploading archives to sonatype
1 parent 97edabf commit 1cf5d77

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ uploadArchives {
155155
authentication(userName: "$repoUsername", password: "$repoPassword")
156156
}
157157

158-
if(uploadToMavenCentral) {
159-
beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }
160-
}
161-
158+
if (project.property('uploadRepository').contains("sonatype")) {
159+
beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }
160+
}
162161

163162
configurePom(pom)
164163
}

0 commit comments

Comments
 (0)