From: Ben Soares Date: Tue, 17 Mar 2020 12:42:25 +0000 (+0000) Subject: Revert "JAL-3541 trying out previous cloverReport task" X-Git-Tag: Develop-2_11_2_0-d20201215~74^2~3^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a63553bc7a8a5b8859afe844573acae8b18a8480;p=jalview.git Revert "JAL-3541 trying out previous cloverReport task" This reverts commit dc70a1f7934471a4084c3f10e7bd630d72aa3bf3. --- diff --git a/build.gradle b/build.gradle index 8dd6187..3683195 100644 --- a/build.gradle +++ b/build.gradle @@ -569,6 +569,33 @@ task cloverInstr() { } +task cloverReportHTML (type: JavaExec) { + inputs.dir "${buildDir}/clover" + outputs.dir "${reportsDir}/clover" + + classpath configurations.cloverRuntime + maxHeapSize "${cloverReportJVMHeap}" + jvmArgs += "${cloverReportJVMArgs}" + main = "com.atlassian.clover.reporters.html.HtmlReporter" + 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 "${cloverReportJVMHeap}" + jvmArgs "${cloverReportJVMArgs}" + classpath configurations.cloverRuntime + main = "com.atlassian.clover.reporters.xml.XMLReporter" + args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover/clover.xml" + + "${cloverReportXMLOptions}".split(",").each { + args+= it.trim() + } +} task cloverReport { group = "Verification" description = "Creates the Clover report" @@ -577,17 +604,8 @@ task cloverReport { onlyIf { file("${buildDir}/clover/clover.db").exists() } - doFirst { - def argsList = ["--initstring", "${buildDir}/clover/clover.db", - "-o", "${reportsDir}/clover"] - String[] args = argsList.toArray() - com.atlassian.clover.reporters.html.HtmlReporter.runReport(args) - - // and generate ${reportsDir}/clover/clover.xml - args = ["--initstring", "${buildDir}/clover/clover.db", - "-o", "${reportsDir}/clover/clover.xml"].toArray() - com.atlassian.clover.reporters.xml.XMLReporter.runReport(args) - } + dependsOn cloverReportXML + dependsOn cloverReportHTML } // end clover bits