f58acbeef5
Excludes stdlib projects from build and uses bootstrap stdlib artifacts #KT-29205
59 lines
1.3 KiB
Groovy
59 lines
1.3 KiB
Groovy
description = 'Kotlin Test for JS'
|
|
|
|
apply plugin: 'kotlin-platform-js'
|
|
|
|
configureDist(project)
|
|
configurePublishing(project)
|
|
|
|
dependencies {
|
|
expectedBy project(':kotlin-test:kotlin-test-common')
|
|
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
|
compile kotlinStdlib("js")
|
|
}
|
|
|
|
compileKotlin2Js {
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xuse-experimental=kotlin.contracts.ExperimentalContracts"]
|
|
kotlinOptions {
|
|
moduleKind = "umd"
|
|
outputFile = "${buildDir}/classes/main/kotlin-test.js"
|
|
sourceMap = true
|
|
sourceMapPrefix = "./"
|
|
sourceMapEmbedSources = "always"
|
|
}
|
|
}
|
|
|
|
compileTestKotlin2Js {
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
|
kotlinOptions {
|
|
metaInfo = false
|
|
moduleKind = "umd"
|
|
}
|
|
}
|
|
|
|
|
|
archivesBaseName = 'kotlin-test-js'
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Test')
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from (sourceSets.main.allSource)
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
task distJs(type: Copy) {
|
|
dependsOn(compileKotlin2Js)
|
|
from(compileKotlin2Js.kotlinOptions.outputFile)
|
|
into "$distDir/js"
|
|
}
|
|
|
|
dist {
|
|
dependsOn distJs
|
|
from (jar, sourcesJar)
|
|
} |