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-08-10 22:02:12 +08:00
|
|
|
// useEsModules()
|
2023-07-10 11:25:17 +08:00
|
|
|
// bug example kotlin CharSequence.contains(char: Char) not work with js string.includes(string)
|
|
|
|
generateTypeScriptDefinitions()
|
|
|
|
browser {}
|
|
|
|
}
|
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)
|
|
|
|
}
|
|
|
|
}
|