diff --git a/build.gradle b/build.gradle index a967488..51f43ed 100644 --- a/build.gradle +++ b/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'