mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 11:42:22 +08:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
kotlin {
|
|
jvm {
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
// https://kotlinlang.org/docs/js-to-kotlin-interop.html#kotlin-types-in-javascript
|
|
js(IR) {
|
|
binaries.executable()
|
|
useEsModules()
|
|
generateTypeScriptDefinitions()
|
|
browser {}
|
|
}
|
|
sourceSets {
|
|
all {
|
|
languageSettings.optIn("kotlin.js.ExperimentalJsExport")
|
|
}
|
|
commonMain {
|
|
dependencies {
|
|
implementation(libs.kotlin.stdlib.common)
|
|
}
|
|
}
|
|
jvmTest {
|
|
dependencies {
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.junit)
|
|
}
|
|
}
|
|
}
|
|
}
|