-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
68 lines (57 loc) · 1.7 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.3'
id 'io.spring.dependency-management' version '1.1.6'
id "org.sonarqube" version "4.0.0.2929"
id 'jacoco'
}
sonar {
properties {
property "sonar.projectKey", "hys_olive-young-server-shutter_AZGRWz0i-w2BHcLnXznU"
property "sonar.qualitygate.wait", true
property "sonar.java.coveragePlugin", "jacoco" // JaCoCo 사용 설정
property "sonar.jacoco.reportPaths", "build/reports/jacoco/test/jacocoTestReport.xml"
}
}
jacoco {
toolVersion = "0.8.8" // JaCoCo의 최신 버전
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport // 테스트가 끝난 후 JaCoCo 리포트 생성
}
jacocoTestReport {
dependsOn test // 테스트 후 리포트 생성
reports {
xml.required.set(true) // SonarQube가 인식할 수 있도록 XML 리포트 생성
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml")) // HTML 리포트를 생성할 위치를 설정
}
}
group = 'olive.young'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
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'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'me.paulschwarz:spring-dotenv:4.0.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
}
tasks.named('test') {
useJUnitPlatform()
}