build: added jacoco coverage support
This commit is contained in:
parent
adb0a49711
commit
df8acbeefa
23
build.gradle
23
build.gradle
@ -2,6 +2,7 @@ plugins {
|
||||
id 'java'
|
||||
id 'idea'
|
||||
id "org.sonarqube" version "3.2.0"
|
||||
id 'jacoco'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -17,6 +18,28 @@ test {
|
||||
maxParallelForks = 1
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
html.enabled true
|
||||
xml.enabled true
|
||||
xml.destination file("${buildDir}/reports/jacoco.xml")
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withType(JacocoPlugin) {
|
||||
tasks["test"].finalizedBy 'jacocoTestReport'
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
property "sonar.host.url", "https://sonarqube.yandrik.dev"
|
||||
property "sonar.coverage.jacoco.xmlReportPath", "${buildDir}/reports/jacoco.xml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.4'
|
||||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.4'
|
||||
|
Loading…
Reference in New Issue
Block a user