File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
gradle/build-logic/src/main/kotlin/plugins Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,12 @@ nmcp {
106106
107107signing {
108108 setRequired { hasSigningKey }
109- useInMemoryPgpKeys(signingKeyId.orNull, signingKey.orNull, signingPassword.orNull)
109+ if (hasSigningKey) {
110+ useInMemoryPgpKeys(signingKeyId.orNull, signingKey.orNull, signingPassword.orNull)
111+ // useGpgCmd()
112+ }
110113 sign(publishing.publications)
111- // useGpgCmd()
112- // isPublish = gradle.taskGraph.allTasks.any { it.name.startsWith("publish") }
114+ // gradle.taskGraph.allTasks.any { it.name.startsWith("publish") }
113115}
114116
115117fun MavenPublication.configurePom () {
@@ -144,11 +146,11 @@ fun MavenPublication.configurePom() {
144146}
145147
146148tasks {
147- withType<Sign >().configureEach { onlyIf { hasSigningKey } }
148-
149149 // Suppressing publication validation errors
150150 withType<GenerateModuleMetadata > { suppressedValidationErrors.add(" enforced-platform" ) }
151151
152+ withType<Sign >().configureEach { onlyIf { hasSigningKey } }
153+
152154 // For publishing kotlin native binaries
153155 withType<PublishToMavenRepository >().configureEach { mustRunAfter(withType<KotlinNativeLink >()) }
154156
You can’t perform that action at this time.
0 commit comments