-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
43 lines (38 loc) · 814 Bytes
/
build.gradle
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
plugins {
//inlude the nodeJS plugin to execute nodejs and npm tasks
id "com.moowork.node" version "1.2.0"
}
node {
download = true
version = "9.11.1"
npmVersion = "5.6.0"
}
repositories.whenObjectAdded {
if (it instanceof IvyArtifactRepository) {
metadataSources {
artifact()
}
}
}
//declare a build task
task build
//declare a task to create a zip of the app
task zip(type: Zip) {
from ('.') {
include "*"
include "bin/**"
include "data/**"
include "node_modules/**"
include "public/**"
include "routes/**"
include "views/**"
}
destinationDir(file("dist"))
baseName "trainSchedule"
}
//declare task dependencies
build.dependsOn zip
zip.dependsOn npm_build
npm_build.dependsOn npm_test
npm_test.dependsOn npmInstall
npm_build.dependsOn npmInstall