diff options
author | nea <romangraef@gmail.com> | 2021-08-20 15:33:32 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2021-08-20 15:33:58 +0200 |
commit | 5042498c8fe12751c1b6560ae1fde07e7cd78259 (patch) | |
tree | 688aa93978ffffd0b15c639768fdad6f17609bdd /build.gradle.kts | |
parent | 65a6ffeb6761994d4d69011c87f23fe074f7a1f7 (diff) | |
download | webos-5042498c8fe12751c1b6560ae1fde07e7cd78259.tar.gz webos-5042498c8fe12751c1b6560ae1fde07e7cd78259.tar.bz2 webos-5042498c8fe12751c1b6560ae1fde07e7cd78259.zip |
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 99c6139..c657335 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - kotlin("multiplatform") version "1.5.21" + kotlin("js") version "1.5.21" id("io.kotest.multiplatform") version "5.0.0.3" id("com.bnorm.power.kotlin-power-assert") version "0.10.0" } @@ -14,24 +14,19 @@ val kotestVersion: String by project configure<com.bnorm.power.PowerAssertGradleExtension> { functions = listOf("kotlin.assert", "kotlin.test.assertTrue", "kotlin.test.assertFalse", "kotlin.test.assertEquals") } - kotlin { - targets { - js(IR) { - nodejs { } - browser { - webpackTask { - output.libraryTarget = "umd" - } - testTask { useMocha() } - } + js(IR) { + binaries.executable() + useCommonJs() + browser { + testTask { useMocha() } } } sourceSets { - val jsMain by getting { + val main by getting { } - val jsTest by getting { + val test by getting { dependencies { implementation("io.kotest:kotest-assertions-core:5.0.0.376-SNAPSHOT") implementation("io.kotest:kotest-framework-api:5.0.0.376-SNAPSHOT") @@ -40,3 +35,13 @@ kotlin { } } } + +tasks.withType<org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile>() { + kotlinOptions { + moduleKind = "commonjs" + sourceMap = true + sourceMapEmbedSources = "always" + freeCompilerArgs += "-Xopt-in=kotlin.contracts.ExperimentalContracts" + + } +} |