buildscript { extra.set("production", (findProperty("prod") ?: findProperty("production") ?: "false") == "true") } plugins { kotlin("multiplatform") id("kotlinx-serialization") id("maven-publish") } repositories() // Versions val serializationVersion: String by project val jacksonModuleKotlinVersion: String by project kotlin { kotlinJsTargets() kotlinJvmTargets() sourceSets { val commonMain by getting { dependencies { implementation(kotlin("stdlib-common")) implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion") } } val jsMain by getting { dependencies { implementation(kotlin("stdlib-js")) implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serializationVersion") } } val jvmMain by getting { dependencies { implementation(kotlin("stdlib")) implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") } } } } publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-common-types" pom { defaultPom() } } } setupPublication()