Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
113 lines (92 sloc) 3.97 KB
<?xml version="1.0"?>
<project name="AntPile v1.3.0 RC1" basedir="." default="full-build">
<!-- identify properties file -->
<property file="build.properties" />
<!-- Set up FlexUnit Ant tasks -->
<taskdef resource="flexUnitTasks.tasks" classpath="${lib.loc}/flexUnitTasks.jar" />
<!-- Add the ant-contrib tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${lib.loc}/ant-contrib.jar" />
<import file="${includes.loc}/logging.xml" />
<import file="${includes.loc}/misc.xml" />
<import file="${includes.loc}/test.xml" />
<import file="${includes.loc}/asdoc.xml" />
<import file="${includes.loc}/package-air.xml" />
<import file="${includes.loc}/compile-swf.xml" />
<import file="${includes.loc}/compile-swc.xml" />
<import file="${includes.loc}/android.xml" />
<!--<import file="${includes.loc}/apparat.xml" />-->
<target name="startlog" depends="logging.start"/>
<target name="usage" depends="misc.usage" description="Prints usage message" />
<target name="test" depends="startlog" description="Runs unit tests and displays the report">
<log>start target test</log>
<runtarget target="test.run"/>
<log>end target test</log>
</target>
<target name="asdoc" depends="asdoc.gen" description="generates ASDoc"/>
<target name="compile" depends="startlog" description="Compiles the project as a swf">
<log>start target compile</log>
<!--check for compiler flag: normal compile vs apparat compile-->
<if>
<equals arg1="air" arg2="${compile.platform}" casesensitive="false" />
<then>
<echo>[compile] Compiling AIR</echo>
<runtarget target="compile-swf.compile" />
<runtarget target="package-air.package" />
</then>
<else>
<echo>[compile] Compiling SWF</echo>
<log message="Compile Build: Compiling SWF"/>
<runtarget target="compile-swf.compile" />
</else>
</if>
<log>end target compile</log>
</target>
<target name="run" description="Runs app">
<if>
<equals arg1="air" arg2="${compile.platform}" casesensitive="false" />
<then><!--<runtarget target="compile-air.local-run" />--></then>
<else><runtarget target="compile-swf.local-run" /></else>
</if>
</target>
<target name="full-build" description="Runs tests, compiles project, and optionally runs it.">
<if>
<istrue value="${run.test}"/>
<then>
<log message="Full Build: Running Unit Tests"/>
<runtarget target="test" />
</then>
</if>
<if>
<istrue value="${run.asdoc}"/>
<then>
<log message="Full Build: Generating ASDocs"/>
<runtarget target="asdoc" />
</then>
</if>
<if>
<istrue value="${mobile}"/>
<then>
<runtarget target="deploy-to-phone" />
</then>
<else>
<runtarget target="compile" />
</else>
</if>
<if>
<istrue value="${autolaunch.url}"/>
<then><runtarget target="run"/></then>
</if>
</target>
<target name="compile-swc" description="Compiles project as swc" depends="compile-swc.compile" />
<target name="deploy-lib" description="Prepares swf lib and moves it to deploy directory" depends="compile-swc.deploy"/>
<target name="package" depends="startlog" description="Packages up project as air app">
<log>start target package-apk</log>
<echo message="${compile.platform}"/>
<echo message="${mobile}"/>
<runtarget target="compile"/>
<runtarget target="package-air.package" />
<log>end target package-apk</log>
</target>
<target name="deploy-to-emulator" depends="package,android.deploy-to-emulator" />
<target name="deploy-to-phone" depends="package,android.deploy-to-phone" />
</project>