[JS IR] Build stdlib using compiler from repo
Previously JS IR versions of stdlib and kotlin-test were build
by default using compiler previously built on a buildserver.
It had some issues:
- This required us to advance bootstrap every time we made any
incompatible IR changes. This happens often since IR ABI is
not quite stable yet.
- We never tested the exact combination of compiler and stdlib we publish
We tested:
- new compiler with new stdlib build by new compiler (in box tests)
- old compiler with new stdlib build by old compiler (in stdlib tests)
We published:
- new compiler with new stdlib build by old compiler
After this change JS IR compiler tests, builds and publishes
single configuration:
new compiler with new stdlib build by new compiler
JS IR stdlib and kotlin-test are now built using JavaExec of CLI instead
of Gradle plugin to avoid troubles of loading a freshly built plugin.
This also allows to have a granular dependencies: we don't rebuild klib
if we changed a lowering in a compiler backend, but we do rebuild it if
we changed IR serialization algorithm.
This commit is contained in:
@@ -310,8 +310,6 @@ task libraryJarWithoutIr(type: Jar, dependsOn: compileJs) {
|
||||
}
|
||||
|
||||
task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
||||
def irStdlibJar = tasks.getByPath(":kotlin-stdlib-js-ir:jar")
|
||||
dependsOn(irStdlibJar)
|
||||
|
||||
archiveExtension = "jar"
|
||||
destinationDirectory = file("$buildDir/libs")
|
||||
@@ -319,8 +317,10 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
||||
duplicatesStrategy DuplicatesStrategy.FAIL
|
||||
|
||||
from zipTree(libraryJarWithoutIr.archiveFile)
|
||||
from(zipTree(irStdlibJar.archiveFile)) {
|
||||
exclude 'META-INF/*'
|
||||
if (rootProject.includeStdlibJsIr) {
|
||||
def irKlib = tasks.getByPath(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
|
||||
dependsOn(irKlib)
|
||||
from fileTree("${irKlib.outputs.files.singleFile.path}/klib")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ task distSourcesJar(type: Jar) {
|
||||
|
||||
|
||||
artifacts {
|
||||
runtime libraryJarWithIr
|
||||
runtime libraryJarWithoutIr
|
||||
archives libraryJarWithIr
|
||||
archives sourcesJar
|
||||
sources sourcesJar
|
||||
|
||||
Reference in New Issue
Block a user