diff --git a/build.gradle.kts b/build.gradle.kts index eaf82b2..f5e5218 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalWasmDsl::class) + import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { @@ -48,7 +50,6 @@ kotlin { @OptIn(ExperimentalWasmDsl::class) wasmJs { browser() - nodejs() } mingwX64() @@ -58,14 +59,14 @@ kotlin { all { languageSettings.optIn("kotlin.RequiresOptIn") } - val commonMain by getting { + commonMain { dependencies { implementation(kotlin("stdlib-common")) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") } } - val commonTest by getting { + commonTest { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) @@ -74,39 +75,19 @@ kotlin { } } - val jsMain by getting { - dependencies { - implementation(kotlin("stdlib-js")) - } - } - - val jsTest by getting { - dependencies { - implementation(kotlin("test-js")) - } - } - - val jvmMain by getting { - dependencies { - implementation(kotlin("stdlib-jdk8")) - } - } - - val jvmTest by getting { + jsTest { dependencies { - implementation(kotlin("test-junit5")) - implementation("io.kotlintest:kotlintest-runner-junit5:3.3.2") - runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.5.2") + implementation(kotlin("test")) } } - val linuxX64Main by getting { + val wasmJsTest by getting { dependencies { - implementation(kotlin("stdlib")) + implementation(kotlin("test")) } } - val linuxX64Test by getting { + jvmTest { dependencies { implementation(kotlin("test")) } @@ -182,7 +163,6 @@ tasks { } withType { - useJUnitPlatform() reports { junitXml.required.set(true) } diff --git a/src/commonTest/kotlin/CorBaseTest.kt b/src/commonTest/kotlin/CorBaseTest.kt index 0104952..b02f5c1 100644 --- a/src/commonTest/kotlin/CorBaseTest.kt +++ b/src/commonTest/kotlin/CorBaseTest.kt @@ -5,12 +5,10 @@ import com.crowdproj.kotlin.cor.handlers.parallel import com.crowdproj.kotlin.cor.handlers.worker import com.crowdproj.kotlin.cor.helper.CorStatuses import com.crowdproj.kotlin.cor.helper.TestContext -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertEquals -@OptIn(ExperimentalCoroutinesApi::class) class CorBaseTest { @Test fun createCor() = runTest {