From 3ae239cafb96b66c0f03dfcd4a8cfde550ac80d3 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 27 Jul 2019 18:45:42 +0300 Subject: [PATCH] Automatic link generation for JS distribution --- src/main/kotlin/Scientifik.kt | 2 +- src/main/kotlin/scientifik/ScientifikMPPlugin.kt | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/Scientifik.kt b/src/main/kotlin/Scientifik.kt index e419764..c3f89db 100644 --- a/src/main/kotlin/Scientifik.kt +++ b/src/main/kotlin/Scientifik.kt @@ -2,7 +2,7 @@ * Build constants */ object Scientifik { - const val ioVersion = "0.1.11" + const val ioVersion = "0.1.13" const val coroutinesVersion = "1.2.2" const val atomicfuVersion = "0.12.9" const val serializationVersion = "0.11.1" diff --git a/src/main/kotlin/scientifik/ScientifikMPPlugin.kt b/src/main/kotlin/scientifik/ScientifikMPPlugin.kt index 71538bf..3d59db9 100644 --- a/src/main/kotlin/scientifik/ScientifikMPPlugin.kt +++ b/src/main/kotlin/scientifik/ScientifikMPPlugin.kt @@ -38,7 +38,7 @@ open class ScientifikMPPlugin : Plugin { api(kotlin("stdlib")) project.afterEvaluate { if (extension.serialization) { - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Scientifik.serializationVersion}") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${Scientifik.serializationVersion}") } if(extension.io){ api("org.jetbrains.kotlinx:kotlinx-io:${Scientifik.ioVersion}") @@ -56,6 +56,10 @@ open class ScientifikMPPlugin : Plugin { dependencies { api(kotlin("stdlib-jdk8")) project.afterEvaluate { + if (extension.serialization) { + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Scientifik.serializationVersion}") + } + if (extension.io) { api("org.jetbrains.kotlinx:kotlinx-io-jvm:${Scientifik.ioVersion}") } @@ -72,6 +76,10 @@ open class ScientifikMPPlugin : Plugin { dependencies { api(kotlin("stdlib-js")) project.afterEvaluate { + if (extension.serialization) { + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:${Scientifik.serializationVersion}") + } + if (extension.io) { api("org.jetbrains.kotlinx:kotlinx-io-js:${Scientifik.ioVersion}") } @@ -111,7 +119,7 @@ open class ScientifikMPPlugin : Plugin { from(project.fileTree("src/jsMain/web")) into(jsBrowserWebpack.destinationDirectory!!) doLast{ - val indexFile = File(browserWebpack.destinationDirectory!!,"index.html") + val indexFile = File(jsBrowserWebpack.destinationDirectory!!,"index.html") if(indexFile.exists()){ println("Run JS distribution at: ${indexFile.canonicalPath}") }