From b11ea4d35abbb528a241a58b502e35b023812b4a Mon Sep 17 00:00:00 2001 From: sergeych Date: Sat, 8 Jun 2024 20:32:37 +0700 Subject: [PATCH] KMP stuff --- build.gradle.kts | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5b834dd..48fe0d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType - plugins { kotlin("multiplatform") version "2.0.0" id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0" @@ -17,23 +15,15 @@ repositories { } kotlin { - jvm { - jvmToolchain(8) - withJava() - testRuns.named("test") { - executionTask.configure { - useJUnitPlatform() - } - } - } - linuxX64("native") - - macosX64() - macosArm64() - iosX64() - iosArm64() - iosSimulatorArm64() + jvm() linuxX64() + linuxArm64() + +// macosX64() +// macosArm64() +// iosX64() +// iosArm64() +// iosSimulatorArm64() mingwX64() // wasmJs() no libsodimu bindings yet (strangely) // val ktor_version = "2.3.6" @@ -45,6 +35,7 @@ kotlin { languageSettings.optIn("kotlin.ExperimentalUnsignedTypes") } + val commonMain by getting { dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") @@ -64,21 +55,18 @@ kotlin { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") } } + val native by creating { + dependsOn(commonMain) + dependencies { + } + } val jvmMain by getting { dependencies { } } val jvmTest by getting - val jsMain by getting { - dependencies { - } - } - val jsTest by getting - val nativeMain by getting { - dependencies { - } - } - val nativeTest by getting + for (platform in listOf(linuxMain, macosMain, iosMain, mingwMain)) + platform { dependsOn(native) } } }