[JS IR] stdlib: switch between artifacts rather than artifact content
The switch `includeStdlibJsIr` now affects which artifact is published: the one with IR or the one without. Previously it affected whether or not IR was bundled into the artifact "with IR".
This commit is contained in:
@@ -59,11 +59,10 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
||||
duplicatesStrategy DuplicatesStrategy.FAIL
|
||||
|
||||
from zipTree(libraryJarWithoutIr.archiveFile)
|
||||
if (rootProject.includeStdlibJsIr) {
|
||||
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateKotlinTestKLib")
|
||||
dependsOn(irKlib)
|
||||
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
|
||||
}
|
||||
|
||||
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) {
|
||||
@@ -73,7 +72,7 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
|
||||
artifacts {
|
||||
runtime libraryJarWithoutIr
|
||||
archives libraryJarWithIr
|
||||
archives rootProject.includeStdlibJsIr ? libraryJarWithIr : libraryJarWithoutIr
|
||||
distLibrary libraryJarWithoutIr
|
||||
archives sourcesJar
|
||||
sources sourcesJar
|
||||
|
||||
@@ -317,11 +317,10 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
||||
duplicatesStrategy DuplicatesStrategy.FAIL
|
||||
|
||||
from zipTree(libraryJarWithoutIr.archiveFile)
|
||||
if (rootProject.includeStdlibJsIr) {
|
||||
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
|
||||
dependsOn(irKlib)
|
||||
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
|
||||
}
|
||||
|
||||
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
|
||||
dependsOn(irKlib)
|
||||
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +370,7 @@ task distSourcesJar(type: Jar) {
|
||||
|
||||
artifacts {
|
||||
runtime libraryJarWithoutIr
|
||||
archives libraryJarWithIr
|
||||
archives rootProject.includeStdlibJsIr ? libraryJarWithIr : libraryJarWithoutIr
|
||||
archives sourcesJar
|
||||
sources sourcesJar
|
||||
distSources distSourcesJar
|
||||
|
||||
Reference in New Issue
Block a user