Skip to content

Commit 6978173

Browse files
Abduqodiri Qurbonzodawoainikk
authored andcommitted
Add explicit dependency on signing tasks to native test tasks
Workaround for TeamCity build failure: Gradle detected a problem with the following location: '/mnt/agent/work/ffc241641683f2f5/runtime/build/classes/kotlin/linuxX64/main/klib'. Reason: Task ':kotlinx-benchmark-runtime:compileTestKotlinLinuxX64' uses this output of task ':kotlinx-benchmark-runtime:signLinuxX64Publication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
1 parent 343e70a commit 6978173

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

runtime/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
2+
13
plugins {
24
id 'org.jetbrains.kotlin.multiplatform'
35
}
@@ -101,3 +103,10 @@ if (project.findProperty("publication_repository") == "space") {
101103
}
102104
}
103105
}
106+
107+
// Workaround for TeamCity build failure:
108+
// Task 'compileTestKotlinLinuxX64' uses this output of task 'signLinuxX64Publication' without declaring an explicit or implicit dependency.
109+
// TODO: Find out and fix the issue
110+
tasks.withType(KotlinNativeCompile).matching { it.name.toLowerCase().contains("test") }.configureEach {
111+
it.dependsOn(tasks.withType(Sign))
112+
}

0 commit comments

Comments
 (0)