Revert "[JS IR] stdlib: switch between artifacts rather than artifact content"

The default Jar task is disabled, but its archive file is still
configured as an artifact to be published in the 'archives' configuration.
Thus, neither 'install', nor 'publish' tasks could not find this file
when `libraryJarWithIr` isn't triggered and does not build it.
Removing that artifact from the 'archives' configuration artifacts makes
'install' task publish nothing.

Therefore it's better to revert the change so that 'libraryJarWithIr' task
always runs and produces an artifact with the default name.

This reverts commit a9fec211
This commit is contained in:
Ilya Gorbunov
2020-01-10 21:24:43 +03:00
parent e2bb602271
commit 9e4d7df86e
2 changed files with 12 additions and 10 deletions
+6 -5
View File
@@ -59,10 +59,11 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
duplicatesStrategy DuplicatesStrategy.FAIL
from zipTree(libraryJarWithoutIr.archiveFile)
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateKotlinTestKLib")
dependsOn(irKlib)
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
if (rootProject.includeStdlibJsIr) {
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateKotlinTestKLib")
dependsOn(irKlib)
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
@@ -72,7 +73,7 @@ task sourcesJar(type: Jar, dependsOn: classes) {
artifacts {
runtime libraryJarWithoutIr
archives rootProject.includeStdlibJsIr ? libraryJarWithIr : libraryJarWithoutIr
archives libraryJarWithIr
distLibrary libraryJarWithoutIr
archives sourcesJar
sources sourcesJar
+6 -5
View File
@@ -317,10 +317,11 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
duplicatesStrategy DuplicatesStrategy.FAIL
from zipTree(libraryJarWithoutIr.archiveFile)
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
dependsOn(irKlib)
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
if (rootProject.includeStdlibJsIr) {
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
dependsOn(irKlib)
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
}
}
@@ -370,7 +371,7 @@ task distSourcesJar(type: Jar) {
artifacts {
runtime libraryJarWithoutIr
archives rootProject.includeStdlibJsIr ? libraryJarWithIr : libraryJarWithoutIr
archives libraryJarWithIr
archives sourcesJar
sources sourcesJar
distSources distSourcesJar