-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
55 lines (49 loc) · 1.14 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
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.ksp)
alias(libs.plugins.telegram.bot)
application
distribution
}
group = "com.example.webapp"
version = "0.0.1"
repositories {
mavenCentral()
}
kotlin {
jvm { withJava() }
js {
browser()
binaries.executable()
}
jvmToolchain(17)
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlinx.html)
}
}
jvmMain {
dependencies {
implementation(libs.tg.ktor)
}
}
jsMain {
dependencies {
implementation(libs.tg.webapp)
}
}
}
}
tasks {
named("jvmProcessResources") { mustRunAfter("copyJsResources") }
build { dependsOn("copyJsResources") }
create<Copy>("copyJsResources") {
mustRunAfter("jsBrowserDistribution")
from(layout.buildDirectory.dir("dist/js/productionExecutable"))
into(layout.projectDirectory.dir("src/jvmMain/resources/static"))
}
}
application {
mainClass.set("com.example.webapp.TgBotApplicationKt")
}