-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
126 lines (112 loc) · 3.51 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.12.2'
id 'maven-publish'
}
group = 'animealth'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
//jar파일 이름 지정 build -> libs에 있어요~
bootJar{
archivesBaseName = 'animealth'
archiveFileName = 'animealth.jar'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven{ url 'https://jitpack.io' }
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
jacoco {
toolVersion = "0.8.12"
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
ignoreFailures = true
}
jacocoTestReport {
reports {
dependsOn test
reports {
html.required = true
xml.required = true
}
// QueryDSL QDomain 제외시키기
def QDomains = []
for (qPattern in '**/QA'..'**/QZ') {
QDomains.add(qPattern + '*')
}
afterEvaluate {
classDirectories.setFrom(
// 그 외의 매칭되는 클래스도 제외 대상
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
"animealth.animealthbackend.domain.**.**",
"package animealth.animealthbackend/common",
"**/*Application*",
"**/*Config*",
"**/*Dto*",
"**/*DTO*",
"**/*Request*",
"**/*Response*",
"**/*Interceptor*",
"**/*Exception*"
] + QDomains)
})
)
}
}
}
coveralls {
jacocoReportPath 'build/customJacocoReportDir/test/jacocoTestReport.xml'
}
dependencies {
//추가적으로 아직 사용하지 않는 시큐리티 관련된 라이브러리 & 프레임워크 주석처리 해뒀어요 풀어 사용하세요 레디스도 있음
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-authorization-server'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
// implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
// implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
//test 라이브러리
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
// JUnit 5 dependencies
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.0'
// AssertJ
testImplementation 'org.assertj:assertj-core:3.22.0'
// Mockito
testImplementation 'org.mockito:mockito-core:4.4.0'
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
finalizedBy jacocoTestReport
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}