53 lines
1.0 KiB
Groovy
53 lines
1.0 KiB
Groovy
description = 'Kotlin Test for JS'
|
|
|
|
apply plugin: 'kotlin-platform-js'
|
|
|
|
configurePublishing(project)
|
|
|
|
dependencies {
|
|
implement project(':kotlin-test:kotlin-test-common')
|
|
compile project(':kotlin-stdlib-js')
|
|
}
|
|
|
|
compileKotlin2Js {
|
|
// TODO: Why "-Xmulti-platfrom" ?
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
|
kotlinOptions {
|
|
moduleKind = "umd"
|
|
outputFile = "${buildDir}/classes/main/kotlin-test.js"
|
|
}
|
|
}
|
|
|
|
compileTestKotlin2Js {
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
|
kotlinOptions {
|
|
metaInfo = false
|
|
}
|
|
}
|
|
|
|
|
|
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) {
|
|
from(compileKotlin2Js.kotlinOptions.outputFile)
|
|
into "$distDir/js"
|
|
}
|
|
|
|
dist {
|
|
dependsOn distJs
|
|
from (jar, sourcesJar)
|
|
} |