From 471846ddd4afe58ec5b677be31a333d7135ff1e6 Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Sun, 23 Jul 2023 02:19:27 +0200 Subject: [PATCH 1/2] Fix jacoco report generation with gradle --- build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index e427061557199..07b47b1227629 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,7 @@ buildscript { plugins { id 'com.github.ben-manes.versions' version '0.46.0' id 'idea' + id 'jacoco' id 'java-library' id 'org.owasp.dependencycheck' version '8.2.1' id 'org.nosphere.apache.rat' version "0.8.0" @@ -735,9 +736,9 @@ subprojects { dependsOn tasks.test sourceSets sourceSets.main reports { - html.enabled = true - xml.enabled = true - csv.enabled = false + html.required = true + xml.required = true + csv.required = false } } @@ -808,10 +809,9 @@ if (userEnableTestCoverage) { executionData.from = javaProjects.jacocoTestReport.executionData reports { - html.enabled = true - xml.enabled = true + xml.required = true + xml.required = true } - // workaround to ignore projects that don't have any tests at all onlyIf = { true } doFirst { From 2f65098793b78a555b931b82d6975b679c67aa0a Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Sun, 23 Jul 2023 14:18:05 +0200 Subject: [PATCH 2/2] remove the duplication of xml report enabling and restore the HTML one --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 07b47b1227629..62a7e27c968e3 100644 --- a/build.gradle +++ b/build.gradle @@ -809,7 +809,7 @@ if (userEnableTestCoverage) { executionData.from = javaProjects.jacocoTestReport.executionData reports { - xml.required = true + html.required = true xml.required = true } // workaround to ignore projects that don't have any tests at all