-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (52 loc) · 2.14 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
apply plugin: 'java'
apply plugin: 'war'
// In this section you declare where to find the ddependsOnependencies of your project
repositories {
mavenCentral()
flatDir { dirs "./" }
}
// In this section you declare the dependencies for your production and test code
dependencies {
compileOnly group: 'javax', name: 'javaee-api', version: '7.0'
compileOnly group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.0.7.Final'
compileOnly group: 'javax.validation', name: 'validation-api', version: '1.1.0.Final'
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.5'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
// https://mvnrepository.com/artifact/org.apache.commons/commons-csv
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.7'
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation group: 'org.json', name: 'json', version: '20201115'
testCompile "junit:junit:4.11"
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22'
testCompile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.0.7.Final'
testCompile group: 'com.h2database', name: 'h2', version: '1.4.197'
testCompile group: 'io.rest-assured', name: 'rest-assured', version: '3.1.0'
testCompile group: 'commons-io', name: 'commons-io', version: '2.7'
testCompile group: 'org.json', name: 'json', version: '20200518'
}
import org.apache.tools.ant.taskdefs.condition.Os
task npmInstall(type: Exec) {
String npm = 'npm';
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
npm = 'npm.cmd'
}
workingDir './ui'
commandLine npm, 'install'
}
task buildAngular(type: Exec) {
workingDir "./app"
println '' + workingDir
commandLine "ng build --base-href /jee7app/ --prod"
}
task buildReact(type: Exec) {
dependsOn tasks.npmInstall
workingDir "./ui"
println '' + workingDir
commandLine 'npm', 'run-script', 'build'
}
task copyReact(type: Copy) {
dependsOn tasks.buildReact
from('./ui/build/')
into('./src/main/webapp/')
include('**')
}