-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.gradle.kts
59 lines (52 loc) · 1.89 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
51
52
53
54
55
56
57
58
59
plugins {
kotlin("multiplatform").version("2.0.0")
id("com.github.gmazzo.buildconfig").version("5.3.5")
}
repositories {
mavenCentral()
}
kotlin {
jvm()
js {
browser {
testTask {
enabled = false
}
}
binaries.executable()
}
sourceSets {
jsMain.dependencies {
implementation(dependencies.enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.751"))
implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion")
implementation("org.jetbrains.kotlin-wrappers:kotlin-mui-material")
implementation("org.jetbrains.kotlin-wrappers:kotlin-mui-icons-material")
implementation(npm("file-saver", "2.0.5"))
implementation(npm("jszip", "3.10.1"))
implementation(npm("stream", "0.0.2"))
}
commonTest.dependencies {
implementation(kotlin("test"))
implementation("javax.json:javax.json-api:1.1.4")
implementation("org.glassfish:javax.json:1.1.4")
}
}
}
buildConfig {
// BuildConfig configuration here.
// https://github.com/gmazzo/gradle-buildconfig-plugin#usage-in-kts
packageName("wizard")
//-PwizardType=kmp
when(findProperty("wizardType")) {
"kmp" -> buildConfigField("wizard.WizardType", "wizardType", "WizardType.KmpLibrary")
else -> buildConfigField("wizard.WizardType", "wizardType", "WizardType.ComposeApp")
}
}
task<Copy>("fixMissingJvmResources") {
dependsOn("jvmProcessResources")
tasks.findByPath("jvmTest")?.dependsOn(this)
from(project.layout.buildDirectory.dir("processedResources/jvm/main"))
into(project.layout.buildDirectory.dir("resources"))
}