plugins { id("org.jetbrains.kotlin.multiplatform") id("org.jetbrains.kotlin.plugin.serialization") id("org.jetbrains.kotlinx.atomicfu") id("maven-publish") } kotlin { jvmToolchain(8) compilerOptions { // suppresses compiler warning: [EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING] 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. freeCompilerArgs.add("-Xexpect-actual-classes") } jvm { withJava() // not allowed if android { } is present testRuns["test"].executionTask.configure { useJUnitPlatform() testLogging { // This is for logging and can be removed. events("passed", "skipped", "failed") } } } js { binaries.executable() browser { testTask { useKarma { // useChromeHeadless() useFirefoxHeadless() } } } nodejs() } linuxX64() mingwX64() iosArm64() iosSimulatorArm64() macosX64() macosArm64() watchosArm64() watchosSimulatorArm64() tvosArm64() tvosSimulatorArm64() applyDefaultHierarchyTemplate() sourceSets { commonMain { dependencies { api("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDateTimeVersion") implementation("net.codinux.log:kmp-log:$klfVersion") implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinxSerializationVersion") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") implementation("io.ktor:ktor-client-core:$ktorVersion") } } commonTest { dependencies { implementation kotlin("test") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion") } } jvmMain { dependencies { // or use client-java or client-okhttp? implementation("io.ktor:ktor-client-cio:$ktorVersion") } } jvmTest { dependencies { implementation "org.assertj:assertj-core:$assertJVersion" implementation "org.mockito:mockito-core:$mockitoVersion" implementation "ch.qos.logback:logback-classic:$logbackVersion" } } jsMain { dependencies { implementation("io.ktor:ktor-client-js:$ktorVersion") api(npm("@js-joda/timezone", "2.3.0")) } } nativeMain { dependencies { } } linuxMain { dependencies { implementation("io.ktor:ktor-client-curl:$ktorVersion") } } mingwMain { dependencies { implementation("io.ktor:ktor-client-winhttp:$ktorVersion") } } appleMain { dependencies { implementation("io.ktor:ktor-client-darwin:$ktorVersion") } } } }