| <project name="Build GroovyResetAgent" default="gragent"> |
| <dirname property="module.home" file="${ant.file}"/> |
| <dirname property="idea.home" file="${module.home}/../../"/> |
| <property name="build.lib.path" value="${idea.home}/build/lib"/> |
| <property name="idea.lib.path" value="${idea.home}/lib"/> |
| <property name="output.jar.path" value="${module.home}/gragent.jar"/> |
| <property environment="env"/> |
| |
| <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${build.lib.path}/jarjar-1.0.jar"/> |
| |
| <target name="gragent"> |
| <delete dir="anttask.classes" failonerror="false"/> |
| <delete dir="anttask.src" failonerror="false"/> |
| |
| <mkdir dir="anttask.classes"/> |
| <mkdir dir="anttask.src"/> |
| |
| <copy todir="anttask.src"> |
| <fileset dir="${module.home}/agentSrc"> |
| <include name="**/*.java"/> |
| </fileset> |
| </copy> |
| |
| <javac source="1.5" target="1.5" destdir="anttask.classes" fork="true"> |
| <src path="anttask.src"/> |
| <classpath> |
| <fileset dir="${build.lib.path}"> |
| <include name="*.jar"/> |
| </fileset> |
| <fileset dir="${idea.lib.path}"> |
| <include name="asm*.jar"/> |
| </fileset> |
| </classpath> |
| </javac> |
| |
| <jarjar jarfile="${output.jar.path}" manifest="${module.home}/agentSrc/META-INF/MANIFEST.MF"> |
| <fileset dir="anttask.classes"/> |
| <zipfileset src="${idea.lib.path}/asm.jar"/> |
| <rule pattern="org.objectweb.**" result="groovyResetJarjarAsm.@1"/> |
| </jarjar> |
| |
| <delete dir="anttask.classes" failonerror="false"/> |
| <delete dir="anttask.src" failonerror="false"/> |
| |
| </target> |
| </project> |