-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
153 lines (126 loc) · 4.19 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 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.0'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
group = 'com.clover'
version = '1.1.0'
sourceCompatibility = '17'
configurations {
asciidoctorExtensions
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// Spring Boot Starter
// WEB
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// Data
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// Security
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
// Restdocs
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
// DB - MySQL, H2
implementation 'com.mysql:mysql-connector-j:8.0.32'
runtimeOnly 'com.h2database:h2'
// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// QueryDSL (Boot 3.x)
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
implementation 'javax.xml.bind:jaxb-api:2.3.0' // ??
// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// Embedded Redis
testImplementation 'it.ozimov:embedded-redis:0.7.2'
// Jwt
implementation 'io.jsonwebtoken:jjwt:0.9.1'
// Object Storage - S3
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.429'
// Mapstruct (Lombok 의 getter, setter, builder 를 이용하여 생성되므로 Lombok 먼저 의존성 주입 후 사용해야함)
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.3.Final'
// P6spy
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
// Slack
implementation "net.gpedro.integrations.slack:slack-webhook:1.4.0"
// Bucket4j - 처리율 제한
implementation 'com.bucket4j:bucket4j-core:8.3.0'
}
/*jacoco 설정*/
jacocoTestReport {
dependsOn test
finalizedBy 'jacocoTestCoverageVerification'
reports {
html.enabled true
xml.enabled true
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
excludes = [ // 제외할 패키지
'*.global.util*', // util 패키지
'*.global.config*', // config 패키지
'*.global.base*', // base 패키지
'*.global.infra*', // 추후 추가 바람
'*.global.auth.oauth*', // 추후 추가 바람
]
}
}
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}
/*asciidoctor 설정*/
ext {
snippetsDir = file('build/generated-snippets')
}
asciidoctor {
attributes 'snippets': snippetsDir
configurations 'asciidoctorExtensions'
forkOptions {
jvmArgs('--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED', '--add-opens', 'java.base/java.io=ALL-UNNAMED')
}
dependsOn test
inputs.dir snippetsDir
sources {
include("**/index.adoc", "**/api/*.adoc", "**/common/*.adoc", "**/enums/*.adoc")
}
baseDirFollowsSourceFile()
}
asciidoctor.doFirst {
delete file('src/main/resources/static/docs')
}
bootJar {
dependsOn asciidoctor
from("${asciidoctor.outputDir}") {
into "static/docs"
}
}
task copyDocument(type: Copy) {
dependsOn asciidoctor
from file("${asciidoctor.outputDir}")
into file("build/resources/main/static")
}
build {
dependsOn copyDocument
}