-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
44 lines (37 loc) · 1.03 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
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
plugins {
kotlin("js") version "1.5.30"
}
group = "org.pongasoft"
version = "1.4.1"
repositories {
mavenCentral()
jcenter()
maven {
url = uri("https://dl.bintray.com/kotlin/kotlinx")
}
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.2")
}
kotlin {
js(IR) {
browser {
binaries.executable()
webpackTask {
cssSupport.enabled = true
}
runTask {
cssSupport.enabled = 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")