From cb92dde55a5553b9e89e5d6bb5b0745e70b6fdd8 Mon Sep 17 00:00:00 2001 From: Kazik Pogoda Date: Mon, 30 Sep 2024 22:35:07 +0200 Subject: [PATCH] one more attempt to fix the release --- build.gradle.kts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index b3b8886..c5473dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -202,6 +202,24 @@ if (isReleaseBuild) { } } + // Resolves issues with .asc task output of the sign task of native targets. + // See: https://github.com/gradle/gradle/issues/26132 + // And: https://youtrack.jetbrains.com/issue/KT-46466 + tasks.withType().configureEach { + val pubName = name.removePrefix("sign").removeSuffix("Publication") + + // These tasks only exist for native targets, hence findByName() to avoid trying to find them for other targets + + // Task ':linkDebugTest' uses this output of task ':signPublication' without declaring an explicit or implicit dependency + tasks.findByName("linkDebugTest$pubName")?.let { + mustRunAfter(it) + } + // Task ':compileTestKotlin' uses this output of task ':signPublication' without declaring an explicit or implicit dependency + tasks.findByName("compileTestKotlin$pubName")?.let { + mustRunAfter(it) + } + } + signing { useInMemoryPgpKeys( signingKey,