From f42a7cb8b3c375f2ad7ba782b91a622bf9286c5e Mon Sep 17 00:00:00 2001 From: jashaikh <Jalal@2048> Date: Tue, 19 May 2020 15:35:34 +0530 Subject: [PATCH] Added Jacoco Code Coverage For Sonar. --- build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.gradle b/build.gradle index 6f5feb2..68de00d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'org.sonarqube' version '2.8' + id 'jacoco' } group 'com.example' @@ -38,4 +39,15 @@ configurations.all { test { useJUnitPlatform() + finalizedBy jacocoTestReport +} + +jacocoTestReport { + reports { + xml.enabled true + xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml") + html.enabled false + csv.enabled false + } + dependsOn test } \ No newline at end of file -- 2.18.1