[JS IR] Help IDEA: Copy stdlib sources instead of sharing
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user