-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
173 lines (148 loc) · 5.23 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// Apply the java plugin to add support for Java
plugins {
id 'java'
id 'idea'
id 'eclipse'
id 'application'
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.7.RELEASE'
id 'jacoco'
id "com.github.node-gradle.node" version "2.2.2"
}
version = 'v1.0.1'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
application {
mainClassName = 'nl.esciencecenter.computeservice.rest.Application'
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenLocal()
mavenCentral()
jcenter()
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
// In this section you declare the dependencies for your production and test code
dependencies {
// Xenon
implementation group: 'nl.esciencecenter.xenon', name: 'xenon', version: '3.1.0'
implementation group: 'nl.esciencecenter.xenon.adaptors', name: 'xenon-adaptors-cloud', version: '3.0.2'
//Spring(boot)
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.2.4.RELEASE'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter', version: '2.2.4.RELEASE'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: '2.2.4.RELEASE'
implementation group: 'org.springframework.boot', name: 'spring-boot-devtools', version: '2.2.4.RELEASE'
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
//Jackson, match version used in Spring
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.8'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.8'
//compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
//JPA, hibernate and h2 database persistance libraries
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.2.4.RELEASE'
runtimeOnly group: 'com.h2database', name: 'h2', version: '1.4.199'
// Security
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.2.4.RELEASE'
// Admin Interface
//Misc
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
implementation group: 'commons-io', name: 'commons-io', version: '2.5'
implementation group: 'org.fusesource.jansi', name: 'jansi', version: '2.4.0'
//Test
testImplementation group: 'org.hamcrest', name:'hamcrest', version:'2.2'
testImplementation group: 'org.hamcrest', name:'hamcrest-library', version:'2.2'
testImplementation group: 'junit', name:'junit', version:'4.13'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.2.4.RELEASE'
}
bootJar {
baseName = 'xenonflow'
}
// Include some more files in the distribution zip
// Don't use include an extra directory in the dist zip.
distributions {
boot {
baseName = 'xenonflow'
contents {
from(['config/config.yml', 'config/application.properties']) {
into '/config'
}
from('src/test/resources/cwl/echo.cwl') {
into '/cwl'
}
from('docs') {
into 'docs'
}
from (['README.md',
'LICENSE',
'xenon-workflow-execution-api.yaml']) {
into '/'
}
into '/'
}
}
}
// Disable the other distributions
distZip.enabled = false
distTar.enabled = false
test {
testLogging {
events "passed", "skipped", "failed"
}
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.7"
reportsDir = file("$buildDir/reports/coverage")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/coverage/jacocoHtml")
}
}
def webappDir = "$projectDir/src/main/frontend"
node {
// Version of node to use.
version = '14.16.0'
// Version of npm to use.
npmVersion = '7.7.6'
// Version of Yarn to use.
yarnVersion = '1.22.0'
// If true, it will download node using above parameters.
// If false, it will try to use globally installed node.
download = true
// Set the work directory for unpacking node
workDir = file("${webappDir}/nodejs")
// Set the work directory for NPM
npmWorkDir = file("${webappDir}/npm")
// Set the work directory for Yarn
yarnWorkDir = file("${webappDir}")
// Set the work directory where node_modules should be located
nodeModulesDir = file("${webappDir}")
}
sourceSets {
main {
resources {
srcDirs = ["$webappDir/dist", "$projectDir/src/main/resources"]
}
}
}
processResources {
dependsOn "buildAngular"
}
task buildAngular(type: YarnTask) {
dependsOn "yarn"
args = ['run', 'build']
inputs.dir "$webappDir"
outputs.dir("$webappDir/dist/xenonflow-admin")
}