-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
50 lines (42 loc) · 1.3 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
plugins {
kotlin("multiplatform")
id("targets")
id("cinterop")
id("publish")
id("com.goncalossilva.resources") version "0.10.0"
}
repositories {
mavenCentral()
}
kotlin {
explicitApi()
jvmToolchain(11)
sourceSets {
all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("com.goncalossilva:resources:0.10.0")
}
}
}
}
rootProject.plugins.withType(YarnPlugin::class.java) {
rootProject.configure<YarnRootExtension> {
yarnLockMismatchReport = YarnLockMismatchReport.WARNING
yarnLockAutoReplace = true
}
}
// Sanity check before attempting to publish root target without having all targets enabled.
tasks.matching { it.name.startsWith("publishKotlinMultiplatform") }.configureEach {
doFirst {
require(findProperty("targets") == "all") {
"Configuration is set to publish root target without all targets enabled."
}
}
}