forked from aerialist7/kotlin-mui-showcase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
51 lines (41 loc) · 1.29 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
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
plugins {
kotlin("multiplatform")
}
fun kotlinw(target: String): String =
"org.jetbrains.kotlin-wrappers:kotlin-$target"
kotlin {
js {
browser {
commonWebpackConfig {
outputFileName = "index.js"
}
}
binaries.executable()
}
sourceSets {
val jsMain by getting {
val wrappersVersion = extra["kotlin.wrappers.version"]
dependencies {
implementation(project.dependencies.enforcedPlatform(kotlinw("wrappers-bom:$wrappersVersion")))
implementation(kotlinw("react"))
implementation(kotlinw("react-dom"))
implementation(kotlinw("react-router-dom"))
implementation(kotlinw("emotion"))
implementation(kotlinw("mui-material"))
implementation(kotlinw("mui-icons-material"))
implementation(kotlinw("muix-date-pickers"))
implementation(npm("date-fns", "2.30.0"))
implementation(npm("@date-io/date-fns", "2.17.0"))
}
}
}
}
tasks.withType<KotlinJsCompile>().configureEach {
compilerOptions {
target.set("es2015")
}
}
tasks.wrapper {
gradleVersion = "8.8"
}