-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
101 lines (84 loc) · 2.63 KB
/
build.gradle
File metadata and controls
101 lines (84 loc) · 2.63 KB
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
buildscript {
ext {
springBootVersion = '2.1.4.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("com.moowork.gradle:gradle-node-plugin:1.2.0")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'
apply plugin: 'com.moowork.node'
group = 'com.pictureonmap'
version = '0.0.5'
sourceCompatibility = '1.8'
bootJar {
baseName "springboot-service"
launchScript()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation group: 'net.rakugakibox.spring.boot', name: 'logback-access-spring-boot-starter', version: '2.7.1'
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'io.springfox:springfox-swagger2:2.6.1'
implementation 'io.springfox:springfox-swagger-ui:2.6.1'
// DB
implementation 'com.h2database:h2'
implementation group: 'org.hibernate', name: 'hibernate-spatial'
// Utility
implementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.238'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.assertj:assertj-core:3.6.2'
}
task deleteWebFiles(type: Delete) {
delete fileTree('src/main/resources/static') {
include '*.html'
include '*.js'
include '*.css'
}
}
task installDependencies(type: NpmTask) {
args = ['install']
execOverrides {
it.workingDir = './frontend'
}
}
// Task for executing build:gradle in web
task buildWeb(type: NpmTask) {
args = ['run', 'build']
execOverrides {
it.workingDir = './frontend'
}
}
task copyWebFiles(type: Copy) {
from 'frontend/dist'
into 'src/main/resources/static'
include '*.html'
include '*.js'
include '*.css'
include '*.png'
include '*.ttf'
}
installDependencies.dependsOn deleteWebFiles
buildWeb.dependsOn installDependencies
copyWebFiles.dependsOn buildWeb
processResources.dependsOn copyWebFiles