From 63d27927434a488908f6c2ea8c1a83bc07ff0559 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 18 Dec 2024 12:01:46 -0600 Subject: [PATCH] [#1095] Sign the artifacts for Sonatype --- publish.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publish.gradle b/publish.gradle index 0271197d4..478ae52b7 100644 --- a/publish.gradle +++ b/publish.gradle @@ -81,6 +81,7 @@ publishing { // Signing var signingExtension = project.getExtensions().getByType(SigningExtension) as SigningExtension +signingExtension.sign publishing.publications.publishedArtifacts def signPublicationsTask = tasks.register('signPublications') { description "Grouping task which executes all Sign tasks" @@ -111,7 +112,7 @@ gradle.taskGraph.whenReady { TaskExecutionGraph graph -> if ( publishUser == null || publishPass == null ) { throw new RuntimeException( "Cannot perform publishing to OSSRH without credentials." ) } - logger.lifecycle "Publishing groupId: '" + project.group + "', version: '" + project.version + "'" + logger.lifecycle "Publishing {} : {} : {}", project.group, project.name, project.version } if ( wasSigningRequested || wasPublishingRequested ) { @@ -122,7 +123,6 @@ gradle.taskGraph.whenReady { TaskExecutionGraph graph -> var signingKey = resolveSigningKey() var signingPassword = resolveSigningPassphrase() signingExtension.useInMemoryPgpKeys( signingKey, signingPassword ) - signingExtension.sign publishing.publications.publishedArtifacts } else { // signing was not explicitly requested and we are not publishing to OSSRH,