-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
78 lines (68 loc) · 2.29 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
plugins {
id 'org.springframework.boot' version '2.7.2'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'java'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'checkstyle'
}
group = 'com'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
asciidoctorExt
compileOnly {
extendsFrom annotationProcessor
}
}
checkstyle {
maxWarnings = 0 // 규칙이 어긋나는 코드가 하나라도 있을 경우 빌드 fail
configFile = file("${rootDir}/config/google_checks.xml") // 설정 파일 경로 지정
toolVersion = "10.3.2" // 처음에 낮은 버전을 사용했더니 깨지는 현상이 있었다. 설정파일의 내용에 맞는 버전을 선택
}
repositories {
mavenCentral()
}
dependencies {
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// spring boot web
implementation 'org.springframework.boot:spring-boot-starter-web'
// spring boot devtools
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// MongoDB spring boot starter
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
// spring boot validator
implementation 'org.springframework.boot:spring-boot-starter-validation'
// AOP Starter
implementation 'org.springframework.boot:spring-boot-starter-aop:2.7.3'
// json web token
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// Swagger 연동을 위한 spring doc open api
implementation 'org.springdoc:springdoc-openapi-ui:1.6.10'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Rest Docs
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
}
ext {
snippetsDir = file('build/generated-snippets')
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
dependsOn test
}
tasks.named('bootJar') {
dependsOn asciidoctor
from("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}