diff options
author | Florian Zschocke <f.zschocke+git@gmail.com> | 2020-10-22 17:42:01 +0200 |
---|---|---|
committer | Florian Zschocke <f.zschocke+git@gmail.com> | 2020-10-22 17:42:01 +0200 |
commit | a5cb3bda71840d0257c21ba56a7d6abf4a3a5938 (patch) | |
tree | c42524446e54397590bc477247e4a27793d36216 | |
parent | 5a32e6450c0b709925c35d1ba5162fa00c9686e0 (diff) | |
download | gitblit-a5cb3bda71840d0257c21ba56a7d6abf4a3a5938.tar.gz gitblit-a5cb3bda71840d0257c21ba56a7d6abf4a3a5938.zip |
build: Create single XML JaCoCo report
This can be uploaded to coverage services like Coveralls etc.
-rw-r--r-- | build.xml | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?>
-<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie">
+<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie" xmlns:jacoco="antlib:org.jacoco.ant">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,7 +160,22 @@ <!-- Run unit tests -->
<mx:test failonerror="true" />
-
+
+ <!-- Create JaCoCo single XML report file for code coverage service. -->
+ <jacoco:report>
+ <executiondata>
+ <file file="${project.outputDirectory}/jacoco.exec"/>
+ </executiondata>
+ <structure name="${project.name}">
+ <classfiles>
+ <fileset dir="${project.outputDirectory}/classes"/>
+ </classfiles>
+ <sourcefiles encoding="UTF-8">
+ <fileset dir="${project.src.dir}"/>
+ </sourcefiles>
+ </structure>
+ <xml destfile="${project.targetDirectory}/reports/coverage/jacoco.xml"/>
+ </jacoco:report>
</target>
|