val ktor_version: String by project val kotlin_version: String by project val logback_version: String by project plugins { kotlin("multiplatform") version "1.7.21" kotlin("plugin.serialization") version "1.7.21" id("org.jetbrains.dokka") version "1.7.20" `maven-publish` } group = "net.sergeych" version = "0.4.6" repositories { mavenCentral() mavenLocal() maven("https://maven.universablockchain.com") } kotlin { jvmToolchain { languageVersion.set(JavaLanguageVersion.of("8")) } jvm { compilations.all { kotlinOptions.jvmTarget = "1.8" } withJava() testRuns["test"].executionTask.configure { useJUnitPlatform() } } js(IR) { browser { commonWebpackConfig { cssSupport.enabled = true } } } sourceSets { all { languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi") languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") } val commonMain by getting { dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3") implementation("io.ktor:ktor-client-core:$ktor_version") implementation("io.ktor:ktor-client-websockets:$ktor_version") api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1") api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0") api("net.sergeych:boss-serialization-mp:0.2.9") api("net.sergeych:unikrypto:1.2.2-SNAPSHOT") api("net.sergeych:mp_stools:1.3.2-SNAPSHOT") } } val commonTest by getting { dependencies { implementation(kotlin("test")) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4") } } val jvmMain by getting { dependencies { implementation("org.mapdb:mapdb:3.0.8") implementation("io.ktor:ktor-client-cio-jvm:$ktor_version") implementation("io.ktor:ktor-server-websockets:$ktor_version") implementation("io.ktor:ktor-server-websockets-jvm:$ktor_version") } } val jvmTest by getting { dependencies { implementation("io.ktor:ktor-server-core:$ktor_version") implementation("io.ktor:ktor-server-netty:$ktor_version") implementation("ch.qos.logback:logback-classic:$logback_version") } } val jsMain by getting val jsTest by getting } publishing { repositories { maven { url = uri("https://maven.universablockchain.com/") val mavenUser: String by project val mavenPassword: String by project credentials { username = mavenUser // System.getenv("maven_user") password = mavenPassword // System.getenv("maven_password") } } } } }