-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
127 lines (104 loc) · 4.07 KB
/
build.gradle
File metadata and controls
127 lines (104 loc) · 4.07 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
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
plugins {
id 'org.springframework.boot' version '3.2.2'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id 'checkstyle' //Checkstyle 적용
id 'com.diffplug.spotless' version '6.25.0' //Spotless 적용
}
springBoot {
mainClass = 'com.example.Main'
}
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
// Swagger 3 (OpenAPI)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'me.paulschwarz:spring-dotenv:4.0.0'
}
project(':module_oauth') {
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
bootJar {enabled = false}
jar {enabled = true}
dependencies {
// security
api 'org.springframework.boot:spring-boot-starter-security'
api 'org.springframework.boot:spring-boot-starter-oauth2-client'
// jpa 관련, 추후에 module jpa 만들어서 따로 관리할 것
api (
'org.springframework.boot:spring-boot-starter-data-jpa',
'com.querydsl:querydsl-jpa', // query dsl
'com.jcraft:jsch:0.1.55', // 로컬 개발용 db ssh tunneling, https://mavenlibs.com/maven/dependency/com.jcraft/jsch
// 'org.mariadb.jdbc:mariadb-java-client',
'mysql:mysql-connector-java:8.0.33',
'com.h2database:h2'
)
// 웹 관련 의존성 추가
api 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// Swagger/OpenAPI 의존성 추가
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
// Lombok 의존성 추가
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// JJWT 의존성
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.2'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.2'
// security
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-inline:2.13.0'
}
}
project(':resource-server') {
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
dependencies {
implementation 'me.paulschwarz:spring-dotenv:3.0.0'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
implementation 'org.mariadb.jdbc:mariadb-java-client'
api project(':module_oauth')
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.h2database:h2'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
}
java {
sourceCompatibility = '17'
targetCompatibility = '17'
}
tasks.named('test') {
useJUnitPlatform()
}
}
spotless {
java {
target 'src/main/java/**/*.java' //전체 파일에 적용
indentWithTabs() //하드탭 사용
trimTrailingWhitespace() //불필요한 공백 제거
endWithNewline() //파일 끝 개행 유지
importOrder() //import 정리
removeUnusedImports() //사용하지 않는 import 제거
custom '네이버 컨벤션 적용', { it.replaceAll('(?<=public |private |protected |static |final ) +', ' ') }
}
}
checkstyle {
toolVersion = '8.24' //네이버 컨벤션에 맞는 Checkstyle 버전
configFile = rootProject.file('config/naver-checkstyle-rules.xml') //Checkstyle 규칙 적용
}