2014-08-31 04:05:59 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="Fernflower" default="dist" basedir=".">
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<property name="src" value="${basedir}/src"/>
|
2014-09-01 07:05:08 -04:00
|
|
|
<property name="out" value="${basedir}/out/production"/>
|
2014-08-31 04:05:59 -04:00
|
|
|
<property name="dist" value="${basedir}/fernflower.jar"/>
|
2014-09-01 07:05:08 -04:00
|
|
|
<property name="test-src" value="${basedir}/test"/>
|
|
|
|
<property name="test-out" value="${basedir}/out/test"/>
|
2014-08-31 04:05:59 -04:00
|
|
|
</target>
|
|
|
|
|
2014-09-07 08:13:52 -04:00
|
|
|
<!-- external dependencies, adjust to your own -->
|
|
|
|
<path id="junit">
|
|
|
|
<file name="${basedir}/../../../lib/junit-4.11.jar"/>
|
|
|
|
<file name="${basedir}/../../../lib/hamcrest-core-1.3.jar"/>
|
|
|
|
<file name="${basedir}/../../../lib/hamcrest-library-1.3.jar"/>
|
|
|
|
</path>
|
|
|
|
|
2014-08-31 04:05:59 -04:00
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete includeemptydirs="true" failonerror="false">
|
|
|
|
<fileset dir="${out}"/>
|
2014-09-01 07:05:08 -04:00
|
|
|
<fileset dir="${test-out}"/>
|
2014-08-31 04:05:59 -04:00
|
|
|
<fileset file="${dist}"/>
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init,clean">
|
|
|
|
<mkdir dir="${out}"/>
|
|
|
|
<javac srcdir="${src}" destdir="${out}" source="1.6" target="1.6" encoding="UTF-8" debug="true" includeantruntime="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="dist" depends="init,compile">
|
|
|
|
<jar jarfile="${dist}" compress="true" basedir="${out}" includes="**/*.class">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
2014-05-19 09:01:18 -04:00
|
|
|
|
2014-09-01 07:05:08 -04:00
|
|
|
<target name="test-compile" depends="init,compile">
|
|
|
|
<mkdir dir="${test-out}"/>
|
|
|
|
<javac srcdir="${test-src}" destdir="${test-out}" source="1.6" target="1.6" encoding="UTF-8" debug="true" includeantruntime="false">
|
2014-09-07 08:13:52 -04:00
|
|
|
<classpath path="${out}"/>
|
|
|
|
<classpath refid="junit"/>
|
2014-09-01 07:05:08 -04:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="test" depends="init,test-compile">
|
2014-10-17 09:22:59 -04:00
|
|
|
<junit printsummary="true" failureproperty="tests.failed">
|
2014-09-07 08:13:52 -04:00
|
|
|
<classpath path="${test-out}:${out}"/>
|
|
|
|
<classpath refid="junit"/>
|
2014-09-01 07:05:08 -04:00
|
|
|
<batchtest>
|
|
|
|
<fileset dir="${test-src}" includes="**/*Test.java"/>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
2014-10-17 09:22:59 -04:00
|
|
|
<fail if="tests.failed" message="Tests failed."/>
|
2014-09-01 07:05:08 -04:00
|
|
|
</target>
|
|
|
|
|
2014-05-19 09:01:18 -04:00
|
|
|
</project>
|