-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle.kts
42 lines (35 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
import com.github.gradle.node.npm.task.NpmTask
plugins {
id("base")
id("com.github.node-gradle.node") version "7.0.0"
id("org.nosphere.gradle.github.actions") version "1.3.2"
}
node {
download = true
nodeProjectDir = file("${layout.projectDirectory}/app/launch")
}
tasks {
val npmInstall = named("npmInstall")
val buildStarter by registering(NpmTask::class) {
dependsOn(npmInstall)
workingDir = layout.projectDirectory.file("app/launch")
args = listOf("run", "build")
}
val copyLaunchAssets by registering {
dependsOn(buildStarter)
doLast {
copy {
from(layout.projectDirectory.dir("app/launch/build"))
into(layout.buildDirectory.dir("launch"))
}
copy {
from(layout.projectDirectory.dir("app/start"))
into(layout.buildDirectory.dir("start"))
include("*.html")
}
}
}
named("build") {
dependsOn(copyLaunchAssets)
}
}