2023-07-10 11:25:17 +08:00
|
|
|
plugins {
|
2023-08-31 22:22:03 +08:00
|
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
|
|
alias(libs.plugins.kotlin.serialization)
|
2023-07-10 11:25:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
jvm {
|
|
|
|
compilations.all {
|
|
|
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.majorVersion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// https://kotlinlang.org/docs/js-to-kotlin-interop.html#kotlin-types-in-javascript
|
|
|
|
js(IR) {
|
|
|
|
binaries.executable()
|
2023-09-11 19:19:55 +08:00
|
|
|
useEsModules()
|
2023-07-10 11:25:17 +08:00
|
|
|
generateTypeScriptDefinitions()
|
|
|
|
browser {}
|
|
|
|
}
|
2024-02-26 00:09:13 +08:00
|
|
|
sourceSets {
|
|
|
|
all {
|
|
|
|
languageSettings.optIn("kotlin.js.ExperimentalJsExport")
|
|
|
|
}
|
|
|
|
}
|
2023-08-10 22:02:12 +08:00
|
|
|
sourceSets["commonMain"].dependencies {
|
|
|
|
implementation(libs.kotlin.stdlib.common)
|
2023-07-10 11:25:17 +08:00
|
|
|
}
|
|
|
|
sourceSets["jvmTest"].dependencies {
|
|
|
|
implementation(libs.kotlinx.serialization.json)
|
|
|
|
implementation(libs.junit)
|
|
|
|
}
|
|
|
|
}
|