kotlin-result/buildSrc/src/main/kotlin/kotlin-conventions.gradle.kts

80 lines
1.5 KiB
Plaintext
Raw Normal View History

import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
plugins {
kotlin("multiplatform")
}
kotlin {
jvmToolchain(8)
jvm()
js(IR) {
browser()
nodejs()
}
linuxX64()
mingwX64()
macosArm64()
macosX64()
iosArm64()
iosSimulatorArm64()
iosX64()
tvosArm64()
tvosSimulatorArm64()
tvosX64()
watchosArm32()
watchosArm64()
watchosSimulatorArm64()
watchosX64()
sourceSets {
all {
languageSettings.apply {
optIn("kotlin.contracts.ExperimentalContracts")
}
}
commonTest {
dependencies {
implementation(kotlin("test"))
}
}
jvmTest {
dependencies {
implementation(kotlin("test-junit"))
}
}
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}
tasks.withType<Jar> {
from(rootDir.resolve("LICENSE")) {
into("META-INF")
}
}
/* https://youtrack.jetbrains.com/issue/KT-63014/Running-tests-with-wasmJs-in-1.9.20-requires-Chrome-Canary#focus=Comments-27-8321383.0-0 */
rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
rootProject.tasks.withType<KotlinNpmInstallTask> {
args.add("--ignore-engines")
}