-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
68 lines (54 loc) · 2.02 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.2.2/userguide/tutorial_java_projects.html
*/
// Build client and server files
task assemble {
setDescription "Assembles all project files."
}
// Build artifacts
task build {
setDescription "Builds all project files and artifacts."
}
// Copy frontend content to server resources
task processClientResources(type: ProcessResources) {
setDescription "Update static server resources with recent frontend distribution."
from 'client/dist'
into 'server/build/resources/main/static'
}
// Run the backend (replaces :server:bootRun)
task run {
setDescription "Run the IMIS system. The webserver is listening on port 80 by default."
}
// Run the frontend (replaces :client:serve)
task runFrontendDev {
setDescription "Run a frontend development server supporting hot-reloading of modified " +
"frontend files. An IMIS server instance should be run separately using " +
"`:server:bootRun` task in order for the frontend code to be able to make REST API " +
"calls."
}
// Build a system Jar-File
task jar {
setDescription "Generate a Jarfile of the IMIS system."
}
// Need info of subproject configurations (aka the tasks defined therein)
evaluationDependsOn(":client")
evaluationDependsOn(":server")
// >>>>> DEPENDENCY MAPPINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
tasks.processClientResources.dependsOn(':client:assemble')
tasks.assemble.dependsOn(':processClientResources')
tasks.jar.dependsOn('assemble', ':server:bootJar')
tasks.build.dependsOn('jar')
tasks.run.dependsOn('assemble', ':server:bootRun')
tasks.runFrontendDev.dependsOn(':client:serve')
project(':client') {
tasks.generateClient.dependsOn(':server:buildSwaggerConfig')
}
project(':server') {
tasks.bootRun.mustRunAfter(':assemble')
tasks.bootJar.mustRunAfter(':assemble')
tasks.jib.dependsOn(':assemble')
}