-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
42 lines (33 loc) · 1013 Bytes
/
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
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
plugins {
kotlin("js") version "1.8.21"
}
group = "org.pongasoft"
version = "1.4.2"
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.2")
}
kotlin {
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport {
enabled.set(true)
}
}
}
}
}
// deploy task copies the relevant files to the website folder hosting it
val deployDir = File("/Volumes/Development/local/jamba.dev-www/assets/quickstart/web/js")
val kotlinWebpackTask = tasks.getByName<KotlinWebpack>("browserProductionWebpack")
tasks.create<Copy>("deploy") {
from(kotlinWebpackTask.destinationDirectory)
into(deployDir)
include(kotlinWebpackTask.outputFileName, "js/jszip.min.js")
}.dependsOn("build")