Skip to content

Instantly share code, notes, and snippets.

@up1
Created August 31, 2014 15:35
Show Gist options
  • Save up1/ed9deff763441bb8a81e to your computer and use it in GitHub Desktop.
Save up1/ed9deff763441bb8a81e to your computer and use it in GitHub Desktop.
ant + cubertura
<property name="cobertura.library.dir" value="cobertura_lib" />
<property name="cobertura.dir" value="cobertura" />
<property name="cobertura.instrumented.dir" value="${cobertura.dir}/instrumented" />
<property name="cobertura.jar.file" value="${cobertura.library.dir}/cobertura-2.0.3.jar" />
<path id="cobertura.classpath">
<fileset dir="${cobertura.library.dir}">
<include name="cobertura-2.0.3.jar" />
<include name="*.jar" />
</fileset>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
<target name="instrument">
<cobertura-instrument todir="${cobertura.instrumented.dir}">
<fileset dir="${api.classpath}">
<include name="**/*.class"/>
</fileset>
</cobertura-instrument>
</target>
<target name="coverage-report" depends="instrument">
<cobertura-report format="xml" srcdir="../CSPApi/src" destdir="${cobertura.dir}"/>
<cobertura-report format="html" srcdir="../CSPApi/src" destdir="${cobertura.dir}"/>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment