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.
This commit is contained in:
Ilya Gorbunov
2020-01-14 19:34:35 +03:00
parent 3d7c7c4656
commit 3fabf9b6ad
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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)
+1
View File
@@ -323,6 +323,7 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
}
}
jar.dependsOn(libraryJarWithIr)
task sourcesJar(type: Jar, dependsOn: compileJs) {
classifier = 'sources'