late dependency inclusion for mpp

This commit is contained in:
Alexander Nozik 2019-07-22 18:57:47 +03:00
parent ac1c77d94f
commit 1f3b237c49

View File

@ -66,14 +66,16 @@ open class ScientifikMPPlugin : Plugin<Project> {
val jvmMain by getting { val jvmMain by getting {
dependencies { dependencies {
api(kotlin("stdlib-jdk8")) api(kotlin("stdlib-jdk8"))
if(extension.atomicfu){ project.afterEvaluate {
if (extension.atomicfu) {
implementation("org.jetbrains.kotlinx:atomicfu:${Scientifik.atomicfuVersion}") implementation("org.jetbrains.kotlinx:atomicfu:${Scientifik.atomicfuVersion}")
} }
if(extension.io){ if (extension.io) {
api("org.jetbrains.kotlinx:kotlinx-io-jvm:${Scientifik.ioVersion}") api("org.jetbrains.kotlinx:kotlinx-io-jvm:${Scientifik.ioVersion}")
} }
} }
} }
}
val jvmTest by getting { val jvmTest by getting {
dependencies { dependencies {
implementation(kotlin("test")) implementation(kotlin("test"))
@ -83,14 +85,16 @@ open class ScientifikMPPlugin : Plugin<Project> {
val jsMain by getting { val jsMain by getting {
dependencies { dependencies {
api(kotlin("stdlib-js")) api(kotlin("stdlib-js"))
if(extension.atomicfu){ project.afterEvaluate {
if (extension.atomicfu) {
implementation("org.jetbrains.kotlinx:atomicfu-common-js:${Scientifik.atomicfuVersion}") implementation("org.jetbrains.kotlinx:atomicfu-common-js:${Scientifik.atomicfuVersion}")
} }
if(extension.io){ if (extension.io) {
api("org.jetbrains.kotlinx:kotlinx-io-js:${Scientifik.ioVersion}") api("org.jetbrains.kotlinx:kotlinx-io-js:${Scientifik.ioVersion}")
} }
} }
} }
}
val jsTest by getting { val jsTest by getting {
dependencies { dependencies {
implementation(kotlin("test-js")) implementation(kotlin("test-js"))