Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (78 loc) · 3.64 KB
/
Copy pathbuild.gradle
File metadata and controls
86 lines (78 loc) · 3.64 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
plugins {
id 'java'
id 'org.springframework.boot' version '4.1.2'
id 'io.spring.dependency-management' version '1.1.7'
id 'jacoco'
}
group = 'com.squirrel'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Prometheus 가 읽어 가는 지표(/actuator/prometheus). 지표 주소는 application.yaml 의 노출 목록에 넣어야 열린다. (기본은 닫혀 있다)
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
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-flyway'
// 이메일 인증번호 메일 발송(SMTP)
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-session-data-redis'
implementation 'org.redisson:redisson:4.8.0'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
// 외부 API(토스 등)를 부르는 RestClient 를 쓰기 위한 자동 설정. Spring Boot 4 부터 webmvc 스타터에 들어 있지 않다.
implementation 'org.springframework.boot:spring-boot-starter-restclient'
// 이미지를 S3에 올리기 위한 AWS SDK. 서버가 업로드 받은 파일을 S3에 올린다.
implementation 'software.amazon.awssdk:s3:2.59.0'
implementation 'org.flywaydb:flyway-database-postgresql'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.1.0'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-actuator-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-redis-test'
testImplementation 'org.springframework.boot:spring-boot-starter-flyway-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
testImplementation 'org.springframework.boot:spring-boot-starter-validation-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
testImplementation 'org.testcontainers:testcontainers-postgresql'
testCompileOnly 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testAnnotationProcessor 'org.projectlombok:lombok'
}
jacoco {
// JDK 25 로 컴파일한 클래스를 읽으려면 0.8.14 이상이어야 한다. (낮으면 리포트가 비거나 실패한다)
toolVersion = '0.8.14'
}
tasks.named('test') {
useJUnitPlatform()
// 테스트가 끝나면 커버리지 리포트를 바로 만든다. (CI 에서도 build 한 번으로 리포트가 나온다)
finalizedBy 'jacocoTestReport'
}
tasks.named('jacocoTestReport') {
dependsOn 'test'
reports {
html.required = true
xml.required = true
}
// 로직이 없는 클래스는 비율에서 뺀다. 요청·응답 record, 설정, 에러 코드 목록, 실행 클래스는 테스트 대상이 아니라서 숫자만 흐린다.
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/dto/**',
'**/config/**',
'**/exception/code/**',
'**/TicktingApplication*'
])
}))
}