Skip to content

Commit

Permalink
Don't rely on publication to disable unappreciable publishing tasks
Browse files Browse the repository at this point in the history
It's not being set at the moment, issue created here:
gradle-nexus/publish-plugin#103
  • Loading branch information
goncalossilva committed May 17, 2021
1 parent 6ed55ae commit b7d7466
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion buildSrc/src/main/kotlin/publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ signing {
val commonPublications = arrayOf("jvm", "js", "wasm32", "kotlinMultiplatform")
publishing.publications.matching { commonPublications.contains(it.name) }.all {
tasks.withType<AbstractPublishToMaven>()
.matching { it.publication == this@all }
.matching {
// TODO: Move back to checking for publication once this issue is fixed:
// https://github.com/gradle-nexus/publish-plugin/issues/103
// it.publication == this@all
it.name.matches("publish(Jvm|Js|Wasm32|KotlinMultiplatform).*".toRegex())
}
.configureEach { onlyIf { findProperty("publishCommonTargets") == "true" } }
}

0 comments on commit b7d7466

Please sign in to comment.