-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
70 lines (64 loc) · 1.87 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
61
62
63
64
65
66
67
68
69
70
// Add compose gradle plugin
plugins {
kotlin("multiplatform") version "2.0.20"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.20"
id("org.jetbrains.compose") version "1.7.0-alpha03"
kotlin("plugin.serialization") version "2.0.20"
}
group = "com.theapache64.benchart"
version = "1.0.0-rc01"
// Add maven repositories
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
kotlin {
jvm()
js(IR) {
nodejs {
testTask {
useMocha {
timeout = "9s"
}
}
}
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
binaries.executable()
}
sourceSets {
val jsMain by getting {
dependencies {
implementation(compose.web.core)
implementation(compose.runtime)
implementation(npm("chart.js", "3.9.1", generateExternals = false))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0-RC.2")
}
}
val jsTest by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test-js")
}
}
val jvmMain by getting {
dependencies {
implementation(compose.runtime)
}
}
val jvmTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
}
}
}
// Workaround for https://youtrack.jetbrains.com/issue/KT-49124
rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> {
versions.webpackCli.version = "4.10.0"
}