Skip to content

Commit ee7b7bb

Browse files
committed
Fix the issue of executing sign when publishToMavenLocal
1 parent a53c1a5 commit ee7b7bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deploy.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'signing'
33

44
ext {
55
isReleaseVersion = !(projectVersion =~ /-SNAPSHOT$/)
6+
isNeedSign = project.hasProperty('signing.gnupg.keyName') && isReleaseVersion
67
}
78

89
task sourcesJar(type: Jar) {
@@ -80,7 +81,7 @@ publishing {
8081
}
8182

8283
tasks.withType(Sign) {
83-
onlyIf { project.ext.isReleaseVersion }
84+
onlyIf { project.ext.isNeedSign }
8485
}
8586

8687
signing {

0 commit comments

Comments
 (0)