Skip to content

Commit

Permalink
Fix for wasm platform configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
svok committed Apr 12, 2024
1 parent 1c98a41 commit 9a792c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 31 deletions.
38 changes: 9 additions & 29 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
Expand Down Expand Up @@ -48,7 +50,6 @@ kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
nodejs()
}
mingwX64()

Expand All @@ -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"))
Expand All @@ -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"))
}
Expand Down Expand Up @@ -182,7 +163,6 @@ tasks {
}

withType<Test> {
useJUnitPlatform()
reports {
junitXml.required.set(true)
}
Expand Down
2 changes: 0 additions & 2 deletions src/commonTest/kotlin/CorBaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9a792c9

Please sign in to comment.