/
build.gradle
174 lines (142 loc) · 4.65 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
plugins {
id 'org.springframework.boot' version '2.5.3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'jacoco'
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
}
group = 'com.mealchak'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.json:json:20210307'
// JWT
implementation 'io.jsonwebtoken:jjwt:0.9.1'
// Swagger 추가
implementation "io.springfox:springfox-boot-starter:3.0.0"
implementation "io.springfox:springfox-swagger-ui:3.0.0"
//스프링 시큐리티
implementation 'org.springframework.boot:spring-boot-starter-security'
// Validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
//여기부터 웹소켓 테스트
//스프링 웹소켓
implementation 'org.springframework.boot:spring-boot-starter-websocket'
//스프링 redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
//embedded redis
implementation 'it.ozimov:embedded-redis:0.7.2'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'javax.xml.bind:jaxb-api'
implementation 'org.webjars.bower:bootstrap:4.3.1'
implementation 'org.webjars.bower:vue:2.5.16'
implementation 'org.webjars.bower:axios:0.17.1'
implementation 'org.webjars:sockjs-client:1.1.2'
implementation 'org.webjars:stomp-websocket:2.3.3-1'
//querydsl
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'com.querydsl:querydsl-jpa'
implementation 'com.querydsl:querydsl-apt'
}
test {
jacoco {
destinationFile = file("$buildDir/jacoco/jacoco.exec")
}
useJUnitPlatform()
}
test {
useJUnitPlatform()
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
html.enabled true
csv.enabled false
xml.enabled false
}
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
violationRules {
rule {
// 'element'가 없으면 프로젝트의 전체 파일을 합친 값을 기준으로 한다.
limit {
// 'counter'를 지정하지 않으면 default는 'INSTRUCTION'
// 'value'를 지정하지 않으면 default는 'COVEREDRATIO'
minimum = 0.30
}
}
rule {
// 룰을 간단히 켜고 끌 수 있다.
enabled = true
// 룰을 체크할 단위는 클래스 단위
element = 'CLASS'
// 브랜치 커버리지를 최소한 90% 만족시켜야 한다.
limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.10
}
// 라인 커버리지를 최소한 80% 만족시켜야 한다.
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.10
}
// 빈 줄을 제외한 코드의 라인수를 최대 200라인으로 제한한다.
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 200
// maximum = 8
}
// 커버리지 체크를 제외할 클래스들
excludes = [
// '.test.',
// '.Kotlin'
]
}
}
}
task testCoverage(type: Test) {
group 'verification'
description 'Runs the unit tests with coverage'
dependsOn(':test',
':jacocoTestReport',
':jacocoTestCoverageVerification')
tasks['jacocoTestReport'].mustRunAfter(tasks['test'])
tasks['jacocoTestCoverageVerification'].mustRunAfter(tasks['jacocoTestReport'])
}
def querydslSrcDir = "$buildDir/generated/querydsl"
querydsl {
jpa = true
querydslSourcesDir = querydslSrcDir
}
sourceSets {
main.java.srcDirs querydslSrcDir
}
configurations {
querydsl.extendsFrom compileClasspath
}
compileQuerydsl{
delete(querydslSrcDir)
options.annotationProcessorPath = configurations.querydsl
}