diff --git a/build.gradle b/build.gradle index 7574288b..1088f74d 100644 --- a/build.gradle +++ b/build.gradle @@ -150,9 +150,13 @@ publishing { } } +project.signing { + required { project.gradle.taskGraph.hasTask("release") } + sign publishing.publications.maven +} + if (project.hasProperty("signingKeyId") || project.hasProperty("signingKey")) { project.signing { - required { project.gradle.taskGraph.hasTask("release") } def signingKeyId = project.findProperty("signingKeyId") def signingKey = project.findProperty("signingKey") def signingPassword = project.findProperty("signingPassword")