Skip to content

Commit

Permalink
Have publishing tasks explicitly depend on signing
Browse files Browse the repository at this point in the history
Without the dependency, publishing fails with this error:
> Task ':publishKotlinMultiplatformPublicationToMavenRepository' uses this output of task ':signJvmPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
  • Loading branch information
BenWoodworth committed Mar 27, 2024
1 parent 12c7679 commit ed86b22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ signing {
)

sign(publishing.publications)

// https://github.com/gradle/gradle/issues/26091#issuecomment-1722947958
tasks.withType<AbstractPublishToMaven>().configureEach {
val signingTasks = tasks.withType<Sign>()
mustRunAfter(signingTasks)
}
}

publishing {
Expand Down

0 comments on commit ed86b22

Please sign in to comment.