From ed86b2214506c0ba93c3b5123e949ee2f8a1e846 Mon Sep 17 00:00:00 2001 From: Ben Woodworth Date: Wed, 27 Mar 2024 14:36:32 -0400 Subject: [PATCH] Have publishing tasks explicitly depend on signing 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. --- build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index c23199c2..5aa329e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -129,6 +129,12 @@ signing { ) sign(publishing.publications) + + // https://github.com/gradle/gradle/issues/26091#issuecomment-1722947958 + tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) + } } publishing {