File tree 1 file changed +7
-5
lines changed
gradle/build-logic/src/main/kotlin/plugins
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,12 @@ nmcp {
106
106
107
107
signing {
108
108
setRequired { hasSigningKey }
109
- useInMemoryPgpKeys(signingKeyId.orNull, signingKey.orNull, signingPassword.orNull)
109
+ if (hasSigningKey) {
110
+ useInMemoryPgpKeys(signingKeyId.orNull, signingKey.orNull, signingPassword.orNull)
111
+ // useGpgCmd()
112
+ }
110
113
sign(publishing.publications)
111
- // useGpgCmd()
112
- // isPublish = gradle.taskGraph.allTasks.any { it.name.startsWith("publish") }
114
+ // gradle.taskGraph.allTasks.any { it.name.startsWith("publish") }
113
115
}
114
116
115
117
fun MavenPublication.configurePom () {
@@ -144,11 +146,11 @@ fun MavenPublication.configurePom() {
144
146
}
145
147
146
148
tasks {
147
- withType<Sign >().configureEach { onlyIf { hasSigningKey } }
148
-
149
149
// Suppressing publication validation errors
150
150
withType<GenerateModuleMetadata > { suppressedValidationErrors.add(" enforced-platform" ) }
151
151
152
+ withType<Sign >().configureEach { onlyIf { hasSigningKey } }
153
+
152
154
// For publishing kotlin native binaries
153
155
withType<PublishToMavenRepository >().configureEach { mustRunAfter(withType<KotlinNativeLink >()) }
154
156
You can’t perform that action at this time.
0 commit comments