-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
163 lines (130 loc) · 4.75 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
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.0.1'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.palantir.docker' version '0.34.0'
id 'com.palantir.docker-run' version '0.34.0'
}
group = 'site.moasis'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.google.guava:guava:28.2-jre'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.springframework.boot:spring-boot-starter-mail'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'jakarta.persistence:jakarta.persistence-api'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'org.springframework.security:spring-security-oauth2-core:5.7.3'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// ConfigurationProperties
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// Servlet
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
// Guava Library
implementation 'com.google.guava:guava:28.2-jre'
// Apache common lang : StringUtils
implementation 'org.apache.commons:commons-lang3:3.9'
// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testAnnotationProcessor('org.projectlombok:lombok')
testImplementation 'org.projectlombok:lombok:1.18.22'
// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// Security
implementation 'org.springframework.security:spring-security-oauth2-core:5.7.3'
testImplementation 'org.springframework.security:spring-security-test'
// DB
implementation group: 'org.javassist', name: 'javassist', version: '3.15.0-GA'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
// H2
runtimeOnly 'com.h2database:h2'
// Maria
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.0'
// for StringUtils
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-text:1.9'
// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.0'
// MapStruct
implementation 'org.mapstruct:mapstruct:1.4.2.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.7"
reportsDirectory = layout.buildDirectory.dir('jacoco')
}
jacocoTestReport {
reports {
html.required = true
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacoco/jacocoHtml')
}
dependsOn test
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
// QueryDSL의 Qdomain 클래스를 커버리지 측정 대상에서 제외하기
def Qdomains = []
for (qPattern in '*.QA'..'*.QZ') {
Qdomains.add(qPattern + '*')
}
// QueryDSL의 Qdomain 클래스를 커버리지 측정 대상에서 제외하기
violationRules {
rule {
enabled = true
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.00
}
excludes = ["*Command", "*Query"] + Qdomains
}
}
}
jar {
enabled = false
}
String dockerHubUsernameProperty = findProperty('dockerHubUsername') ?: 'chung1306'
String imageName = "${dockerHubUsernameProperty}/monolithic-be:$version"
docker {
name imageName
files "build/libs/${bootJar.archiveFileName.get()}"
buildArgs([JAR_FILE: bootJar.archiveFileName.get()])
}
dockerRun {
name project.name
image imageName
ports '8080:8080'
clean true
daemonize true
arguments '--network=monolithic-be_moasis-net'
}