From 22f52fc4e15c0330f79dffb903bbeac5916a45b7 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 25 Nov 2021 13:14:49 +0100 Subject: [PATCH] ci: Sign artifacts --- buildSrc/src/main/kotlin/LibsConfig.kt | 5 ++++- buildSrc/src/main/kotlin/PlatformConfig.kt | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/LibsConfig.kt b/buildSrc/src/main/kotlin/LibsConfig.kt index b67bf4b4a..daf806a80 100644 --- a/buildSrc/src/main/kotlin/LibsConfig.kt +++ b/buildSrc/src/main/kotlin/LibsConfig.kt @@ -21,6 +21,7 @@ import org.gradle.kotlin.dsl.invoke import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.provideDelegate import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.the import org.gradle.plugins.signing.SigningExtension import javax.inject.Inject @@ -184,13 +185,15 @@ fun Project.applyLibrariesConfiguration() { mapToMavenScope("runtime") } + val publishingExtension = the() + configure { if (!version.toString().endsWith("-SNAPSHOT")) { val signingKey: String? by project val signingPassword: String? by project useInMemoryPgpKeys(signingKey, signingPassword) isRequired - sign(tasks["publications"]) + sign(publishingExtension.publications) } } diff --git a/buildSrc/src/main/kotlin/PlatformConfig.kt b/buildSrc/src/main/kotlin/PlatformConfig.kt index c1fa3a153..eafb5681f 100644 --- a/buildSrc/src/main/kotlin/PlatformConfig.kt +++ b/buildSrc/src/main/kotlin/PlatformConfig.kt @@ -47,13 +47,15 @@ fun Project.applyPlatformAndCoreConfiguration() { skip() } + val publishingExtension = the() + configure { if (!version.toString().endsWith("-SNAPSHOT")) { val signingKey: String? by project val signingPassword: String? by project useInMemoryPgpKeys(signingKey, signingPassword) isRequired - sign(tasks["publications"]) + sign(publishingExtension.publications) } }