blob: bedc62c9696b285132b43e17eecb5fbc2d7199f4 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.jacoco.agent.buildhook">
<path id="dependencies">
<path refid="bundle-org.jacoco.core"/>
<path refid="bundle-org.objectweb.asm"/>
</path>
<property name="do.compile" value="true"/>
<property name="do.custompackage" value="true"/>
<target name="custompackage">
<taskdef resource="org/jacoco/build/tools/ant/antlib.xml">
<classpath>
<path refid="bundle-org.jacoco.build"/>
<path refid="bundle-org.objectweb.asm"/>
</classpath>
</taskdef>
<!-- The random identifier will be used to create a unique package names -->
<randomid name="randomid"/>
<jar destfile="${result.dist.lib.dir}/jacocoagent.jar" level="9">
<manifest>
<attribute name="Premain-Class" value="org.jacoco.${randomid}.agent.JacocoAgent"/>
<attribute name="Implementation-Title" value="JaCoCo Java Agent"/>
<attribute name="Implementation-Vendor" value="Mountainminds GmbH &amp; Co. KG"/>
<attribute name="Implementation-Version" value="${qualified.bundle.version}"/>
</manifest>
<!-- Move classes into unique packages -->
<renamedclassfileset>
<mapping from="org/jacoco/(.*)" to="org/jacoco/${randomid}/$1"/>
<mapping from="org/objectweb/asm/(.*)" to="org/jacoco/${randomid}/asm/$1"/>
<fileset dir="${result.tmp.bundle.classes.dir}"/>
<!-- Ship required classes only in the agent JAR -->
<deepclassfileset>
<seed>
<fileset dir="${result.tmp.bundle.classes.dir}"/>
</seed>
<fileset dir="${toString:bundle-org.jacoco.core}"/>
<zipfileset includes="**/*.class">
<fileset file="${toString:bundle-org.objectweb.asm}"/>
</zipfileset>
</deepclassfileset>
</renamedclassfileset>
<file file="${source.bundle.dir}/about.html"/>
</jar>
</target>
</project>