-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
141 lines (123 loc) · 4.96 KB
/
build.gradle
File metadata and controls
141 lines (123 loc) · 4.96 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import java.nio.file.Files
import java.nio.file.Paths
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.10'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'jacoco'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
bootJar {
mainClass = 'com.example.meetup_study.MeetupStudyApplication'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-batch'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.hibernate:hibernate-ehcache:5.6.5.Final'
implementation 'org.modelmapper:modelmapper:3.1.1'
testImplementation 'org.modelmapper:modelmapper:3.1.1'
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
compileOnly 'org.projectlombok:lombok'
// developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'com.auth0:java-jwt:4.2.1'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
implementation 'net.coobird:thumbnailator:0.4.14'
}
//processResources {
// filesMatching('**/application-dev.yml') {
// expand([
// APPLICATION_DRIVER_CLASS_NAME: System.getenv('APPLICATION_DRIVER_CLASS_NAME'),
// APPLICATION_URL : System.getenv('APPLICATION_URL'),
// APPLICATION_USERNAME : System.getenv('APPLICATION_USERNAME'),
// GOOGLE_CLIENT_ID : System.getenv('GOOGLE_CLIENT_ID'),
// GOOGLE_CLIENT_SECRET : System.getenv('GOOGLE_CLIENT_SECRET'),
// JWT_SECRET_KEY : System.getenv('JWT_SECRET_KEY'),
// JWT_ACCESSTOKEN_EXPIRATION : System.getenv('JWT_ACCESSTOKEN_EXPIRATION'),
// JWT_ACCESSTOKEN_HEADER : System.getenv('JWT_ACCESSTOKEN_HEADER'),
// JWT_REFRESHTOKEN_EXPIRATION : System.getenv('JWT_REFRESHTOKEN_EXPIRATION'),
// JWT_REFRESHTOKEN_HEADER : System.getenv('JWT_REFRESHTOKEN_HEADER'),
// MAIL_USERNAME : System.getenv('MAIL_USERNAME'),
// MAIL_PASSWORD : System.getenv('MAIL_PASSWORD'),
// MAIL_HOST : System.getenv('MAIL_HOST'),
// MAIL_PORT : System.getenv('MAIL_PORT')
// ])
// }
//}
tasks.named('test') {
doFirst {
def testEnvPath = 'src/main/resources/.env'
if (Files.exists(Paths.get(testEnvPath))) {
Properties props = new Properties()
props.load(new FileInputStream(testEnvPath))
props.each { key, value ->
println(key.toString())
println(value.toString())
if(key.toString() == 'GOOGLE_CLIENT_ID'){
environment key.toString(), value.toString()
}else{
systemProperty key.toString(), value.toString()
}
}
}
}
useJUnitPlatform()
}
test{
finalizedBy 'jacocoTestReport'
}
jacoco {
toolVersion = "0.8.7"
}
jacocoTestReport {
reports {
// html.enabled true
// csv.enabled false
// xml.enabled true
}
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.0
}//0.1이면 100줄 가진 테스트 코드 10줄 이상 작성해야함
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 1000
}//테스트 코드는 1000줄 이상 작성하면 안됨
}
}
}