Commits

Kevin Stembridge committed e2f0d42

formatting

Comments (0)

Files changed (1)

 }
 
 
-//********* artifact signing *********
-if(isReleaseBuild) {
-    signing {
-        sign configurations.archives
-    }
-} else {
-    task signArchives {
-        // do nothing
-    }
+signing {
+    required { isReleaseBuild && gradle.taskGraph.hasTask("uploadArchives") }
+    sign configurations.archives
 }
 
 
         }
         else {
             mavenDeployer {
-                if(isReleaseBuild) {
-                    beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-                }
+                beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
 
                 repository(url: sonatypeRepositoryUrl) {
                     authentication(userName: sonatypeUsername, password: sonatypePassword)