-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (55 loc) · 1.62 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import jdk.tools.jlink.internal.JarArchive
plugins {
id "com.github.node-gradle.node" version "3.1.1"
id 'war'
}
node {
version = '16.8.0'
yarnVersion = '1.5.1'
download = true
}
task bootRun(type: NpmTask, dependsOn: 'npmInstall') {
group = 'application'
description = 'Start client side server'
args = ['run', 'start']
}
task unittests(type: NpmTask, dependsOn: 'npmInstall') {
group = 'verification'
description = 'Execute unit tests'
args = ['run', 'test']
}
task integrationTest(type: NpmTask, dependsOn: 'npmInstall') {
args = ['run', 'e2e']
}
task buildClientDev(type: NpmTask, dependsOn: 'npmInstall') {
group = 'build'
description = 'Compile client side assets for development'
args = ['run', 'buildDev']
}
task buildClient(type: NpmTask, dependsOn: ['npmInstall', 'setVersion']) {
group = 'build'
description = 'Compile client side assets for production'
args = ['run', 'build']
}
task buildWar(type: Exec, dependsOn: 'buildClient') {
group = 'build'
workingDir "$projectDir/dist/dc"
executable "sh"
args = ['-c', 'jar -cvf ../dc.war *']
}
task buildDebFile(type: Exec, dependsOn: ['buildWar']) {
group = 'build'
workingDir "$projectDir/deb-file-creation"
commandLine './create-deb.sh'
}
task setVersion(type: Exec) {
group = 'build'
workingDir "$projectDir"
executable "sh"
args = ['-c', 'git describe --tags --dirty | tr -d \'\\n\' > src/assets/version.txt']
}
task buildClientWatch(type: NpmTask, dependsOn: 'npmInstall') {
group = 'application'
description = 'Builds and watches the client side assets for rebuilding'
args = ['run', 'buildWatch']
}