From 3fabf9b6ad0686be109b2bee17b6a0db288c3158 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 14 Jan 2020 19:34:35 +0300 Subject: [PATCH] Add dependency in disabled jar task on custom libraryJarWithIr jar task is disabled, but its artifact is still used through the runtime configuration in the other projects. In fact, dependent projects get both libs/kotlin-stdlib-js-1.3-SNAPSHOT.jar lib/dist/kotlin-stdlib-js-1.3-SNAPSHOT.jar in their classpath. However the former artifact is built with libraryJarWithIr task after jar task is skipped. This leads to a situation during the parallel build that a dependent project tries to read that artifact when libraryJarWithIr task writes it. This commit adds a dependency edge between the disabled jar and custom libraryJarWithIr tasks, so that the artifact is ready by the moment jar task has finished. --- libraries/kotlin.test/js/build.gradle | 2 ++ libraries/stdlib/js-v1/build.gradle | 1 + 2 files changed, 3 insertions(+) diff --git a/libraries/kotlin.test/js/build.gradle b/libraries/kotlin.test/js/build.gradle index 891209eace3..48377af7cdc 100644 --- a/libraries/kotlin.test/js/build.gradle +++ b/libraries/kotlin.test/js/build.gradle @@ -66,6 +66,8 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) { } } +jar.dependsOn(libraryJarWithIr) + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from (sourceSets.main.allSource) diff --git a/libraries/stdlib/js-v1/build.gradle b/libraries/stdlib/js-v1/build.gradle index e245d62991d..38e3877ce76 100644 --- a/libraries/stdlib/js-v1/build.gradle +++ b/libraries/stdlib/js-v1/build.gradle @@ -323,6 +323,7 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) { } } +jar.dependsOn(libraryJarWithIr) task sourcesJar(type: Jar, dependsOn: compileJs) { classifier = 'sources'