From f1d09ea4af535102e8706d5f508ce30892e6723a Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Mon, 30 Aug 2021 15:51:22 +0200 Subject: [PATCH] Ensure artifact is signed --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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")