[JS IR] Help IDEA: Copy stdlib sources instead of sharing

This commit is contained in:
Svyatoslav Kuzmich
2019-04-30 19:22:37 +03:00
parent 54e6ee82ad
commit 87415cb769
2 changed files with 18 additions and 4 deletions
+11 -2
View File
@@ -9,7 +9,16 @@ dependencies {
compile project(':kotlin-stdlib-js-ir')
}
def jsCommonDir = "${buildDir}/common-js-sources"
task prepareCommonJsSources(type: Sync) {
from "${projectDir}/../js/src/"
into jsCommonDir
}
compileKotlin2Js {
dependsOn prepareCommonJsSources
kotlinOptions {
moduleKind = "umd"
freeCompilerArgs = [
@@ -24,7 +33,7 @@ compileKotlin2Js {
sourceSets {
main {
kotlin {
srcDir "${projectDir}/../js/src"
srcDir jsCommonDir
}
}
}
@@ -66,4 +75,4 @@ if (project.findProperty("kotlin.stdlib.js.ir.dist")?.toBoolean() == true) {
dist {
from(jar, sourcesJar)
}
}
}
+7 -2
View File
@@ -57,7 +57,12 @@ task prepareBuiltinsSources(type: Sync) {
into builtinsSrcDir
}
def jsCommonDir = "${projectDir}/../js"
def jsCommonDir = "${buildDir}/common-js-sources"
task prepareCommonJsSources(type: Sync) {
from("${projectDir}/../js/")
into jsCommonDir
}
sourceSets {
main {
@@ -79,7 +84,6 @@ sourceSets {
}
test {
kotlin {
srcDir "${rootDir}/libraries/stdlib/js/test"
srcDir "${jsCommonDir}/test/"
}
}
@@ -99,6 +103,7 @@ dependencies {
compileKotlin2Js {
dependsOn prepareNativeBuiltinsSources
dependsOn prepareBuiltinsSources
dependsOn prepareCommonJsSources
kotlinOptions {
outputFile = "${buildDir}/classes/main/kotlin.js"