@@ -2,7 +2,9 @@ plugins {
2
2
id ' org.springframework.boot' version ' 2.6.9'
3
3
id ' io.spring.dependency-management' version ' 1.0.11.RELEASE'
4
4
id ' org.asciidoctor.jvm.convert' version ' 3.3.2'
5
+ id ' org.sonarqube' version ' 3.4.0.2513'
5
6
id ' java'
7
+ id ' jacoco'
6
8
}
7
9
8
10
group = ' com.woowacourse'
@@ -34,6 +36,7 @@ dependencies {
34
36
implementation ' org.springframework.boot:spring-boot-starter-validation'
35
37
implementation ' org.springframework.boot:spring-boot-starter-web'
36
38
implementation ' org.flywaydb:flyway-core:6.4.2'
39
+ implementation ' org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
37
40
compileOnly ' org.projectlombok:lombok'
38
41
runtimeOnly ' com.h2database:h2:1.4.200'
39
42
runtimeOnly ' mysql:mysql-connector-java'
@@ -52,6 +55,19 @@ dependencies {
52
55
tasks. named(' test' ) {
53
56
outputs. dir snippetsDir
54
57
useJUnitPlatform()
58
+ finalizedBy ' jacocoTestReport'
59
+ }
60
+
61
+ jacoco {
62
+ toolVersion = " 0.8.7"
63
+ }
64
+
65
+ jacocoTestReport {
66
+ reports {
67
+ xml. enabled true
68
+ csv. enabled false
69
+ html. enabled false
70
+ }
55
71
}
56
72
57
73
tasks. named(' asciidoctor' ) {
@@ -66,14 +82,20 @@ asciidoctor.doFirst {
66
82
}
67
83
68
84
task createDocument (type : Copy ) {
69
- dependsOn asciidoctor
70
- from file(" build/docs/asciidoc" )
71
- into file(" src/main/resources/static" )
85
+ dependsOn asciidoctor
86
+ from file(" build/docs/asciidoc" )
87
+ into file(" src/main/resources/static" )
72
88
}
73
89
74
90
bootJar {
75
- dependsOn createDocument
76
- from(" ${ asciidoctor.outputDir} " ) {
77
- into ' static/docs'
78
- }
91
+ dependsOn createDocument
92
+ from(" ${ asciidoctor.outputDir} " ) {
93
+ into ' static/docs'
94
+ }
95
+ }
96
+
97
+ sonarqube {
98
+ properties {
99
+ property " sonar.projectKey" , " woowacourse-teams_2022-nae-pyeon_AYKuzmWfelLz0D2BhgWj"
100
+ }
79
101
}
0 commit comments