-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathbuild.gradle.kts
60 lines (53 loc) · 1.95 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
60
plugins {
kotlin("multiplatform").version("2.1.10")
id("com.github.gmazzo.buildconfig").version("5.5.1")
id("com.github.ben-manes.versions").version("0.52.0")
}
repositories {
mavenCentral()
}
kotlin {
jvm()
js {
browser {
testTask {
enabled = false
}
}
binaries.executable()
}
sourceSets {
jsMain.dependencies {
implementation(dependencies.enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:2025.1.10"))
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.3"))
}
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"))
}