import com.vanniktech.maven.publish.SonatypeHost import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.androidLibrary) alias(libs.plugins.vanniktech.mavenPublish) } group = "dev.usbharu" version = "1.0.0" kotlin { jvm() androidTarget { publishLibraryVariants("release") @OptIn(ExperimentalKotlinGradlePluginApi::class) compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) } } iosX64() iosArm64() iosSimulatorArm64() linuxX64() mingwX64() @OptIn(ExperimentalWasmDsl::class) js { browser() nodejs() binaries.library() generateTypeScriptDefinitions() } sourceSets { val commonMain by getting { dependencies { //put your multiplatform dependencies here } } val commonTest by getting { dependencies { implementation(libs.kotlin.test) } } } } android { namespace = "dev.usbharu.markdown" compileSdk = libs.versions.android.compileSdk.get().toInt() defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() } } mavenPublishing { publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) signAllPublications() coordinates(group.toString(), "markdown-kt", version.toString()) pom { name = "markdown-kt" description = "Kotlin Multiplatform markdown parser" inceptionYear = "2024" url = "https://github.com/kotlin/multiplatform-library-template/" licenses { license { name = "XXX" url = "YYY" distribution = "ZZZ" } } developers { developer { id = "XXX" name = "YYY" url = "ZZZ" } } scm { url = "XXX" connection = "YYY" developerConnection = "ZZZ" } } }