Skip to content

Commit

Permalink
A more optimized publishing task dependency work around
Browse files Browse the repository at this point in the history
  • Loading branch information
luca992 committed Sep 30, 2022
1 parent bb73509 commit 7e5adff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions secretk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

Expand Down Expand Up @@ -245,9 +244,10 @@ tasks.clean {
}

// https://youtrack.jetbrains.com/issue/KT-46466
val signingTasks = tasks.withType<Sign>()
val dependsOnTasks = mutableListOf<String>()
tasks.withType<AbstractPublishToMaven>().configureEach {
dependsOn(signingTasks)
dependsOnTasks.add(this.name.replace("publish", "sign").replaceAfter("Publication", ""))
dependsOn(dependsOnTasks)
}

plugins.withId("com.vanniktech.maven.publish.base") {
Expand Down

0 comments on commit 7e5adff

Please sign in to comment.