-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
152 lines (121 loc) · 4.17 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
plugins {
id 'org.springframework.boot' version '2.5.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id "com.moowork.node" version "1.3.1"
}
apply plugin: "com.moowork.node"
group = 'com.naturemobility'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
set('springCloudVersion', "2020.0.3")
}
dependencies {
// Spring Boot Starter
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Lombok
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
//log4j
compileOnly 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.16'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.32'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.32'
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.16.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.16.0'
// DB
runtimeOnly 'mysql:mysql-connector-java'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0'
// Web
implementation 'org.springframework.boot:spring-boot-starter-web'
// Security, Authentication
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2','io.jsonwebtoken:jjwt-jackson:0.11.2'
// AOP
implementation 'org.springframework.boot:spring-boot-starter-aop'
//Config Server Client
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
//actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
//slack 설정
implementation 'com.github.maricn:logback-slack-appender:1.4.0'
//profile 마다 다른 logback 설정
implementation 'org.codehaus.janino:janino:3.1.6'
//Gson
implementation 'com.google.code.gson:gson:2.8.7'
//json
implementation 'org.json:json:20220320'
//redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis:2.4.0'
//aws s3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
//temp
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
//thymeleaf
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:2.6.7'
//Swagger
// implementation 'io.springfox:springfox-boot-starter:3.0.0'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
//react와 묶어서 빌드하기
//cmd에서 gradlew clean build 후 실행하면 8080포트에서도 react view가 나타남
def frontendDir = "$projectDir/../wholeinone-client"//react 프로젝트 주소
sourceSets {
main {
resources {
srcDirs = ["$projectDir/src/main/resources"]
}
}
}
processResources {
dependsOn "copyReactBuildFiles"
}
task installReact(type: Exec) {
workingDir "$frontendDir"
inputs.dir "$frontendDir"
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
// commandLine "npm.cmd", "audit", "fix"
commandLine 'npm.cmd', 'install', "--save" ,"--legacy-peer-deps"
} else {
// commandLine "npm", "audit", "fix"
commandLine 'npm', 'install', "--save" ,"--legacy-peer-deps"
}
}
task buildReact(type: Exec) {
dependsOn "installReact"
workingDir "$frontendDir"
inputs.dir "$frontendDir"
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "npm.cmd", "run-script", "build"
} else {
commandLine "npm", "run-script", "build"
}
}
task copyReactBuildFiles(type: Copy) {
dependsOn "buildReact"
from "$frontendDir/build"
into "$projectDir/src/main/resources/static"
}