From 0d12fdd79a8a69440c31dc6f72edddf2e5621d5e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 26 Feb 2020 10:10:31 +0000 Subject: [PATCH] JAL-3541 configurables for clover report generation (JVM heap, JVM args, and -v or -d for debugging) --- build.gradle | 18 +++++++++++++----- gradle.properties | 4 ++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 7e65586..db80bf4 100644 --- a/build.gradle +++ b/build.gradle @@ -474,19 +474,27 @@ task cloverReportHTML (type: JavaExec) { outputs.dir "${reportsDir}/clover" classpath configurations.cloverRuntime - maxHeapSize "2g" + maxHeapSize "${cloverReportJVMHeap}" + jvmArgs += "${cloverReportJVMArgs}" main = "com.atlassian.clover.reporters.html.HtmlReporter" - args "-v", "--initstring", "${buildDir}/clover/clover.db", - "-o", "${reportsDir}/clover" + args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover" + "${cloverReportHTMLOptions}".split(",").each { + args+= it.trim() + } } task cloverReportXML (type: JavaExec) { inputs.dir "${buildDir}/clover" outputs.dir "${reportsDir}/clover" - maxHeapSize "2g" + maxHeapSize "${cloverReportJVMHeap}" + jvmArgs "${cloverReportJVMArgs}" classpath configurations.cloverRuntime main = "com.atlassian.clover.reporters.xml.XMLReporter" - args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover/clover.xml" + args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover/clover.xml" + + "${cloverReportXMLOptions}".split(",").each { + args+= it.trim() + } } task cloverReport { group = "Verification" diff --git a/gradle.properties b/gradle.properties index 2dbdad3..3430f95 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,6 +29,10 @@ classesDir = classes examplesDir = examples clover = false use_clover = false +cloverReportJVMHeap = 2g +cloverReportJVMArgs = -Dfile.encoding=UTF-8 +cloverReportHTMLOptions = -d +cloverReportXMLOptions = cloverClassesDir = clover-classes cloverSourcesInstrDir = sources-instr packageDir = dist -- 1.7.10.2