I need to setup a continuous environment allowing to build air apps, and so I have to setup some ANT script to compile my flash then package it.
I came across the flex task mxmlc which is the base tool to build .swf.
I have setup a base build file using this tool, but my project uses .ANE, and I cannot get them to be included as my swf compiles. I end up with errors as many classes are unknown.
Here is my build file:
<property
name="AIR_SDK_HOME" value="${basedir}/Flex 4.6.0" />
<property
name="FLEX_HOME" value="${basedir}/Flex 4.6.0" />
<property
name="FLEX_TASKS" value="${FLEX_HOME}/ant/flexTasks.tasks" />
<property
name="ADT" value="${SDK}/bin/adt" />
<property
name="MXMLC" value="${SDK}/bin/amxmlc" />
<taskdef resource="flexTasks.tasks" classpath="flexTasks.jar"/>
<target name="compile">
<mxmlc file="${basedir}/src/Main.as"
output="${basedir}/bin-debug/HR_2012_IPAD.swf"
locale="en_US"
static-rsls="true"
accessible="true"
configname="airmobile"
debug="true"
failonerror="true"
fork="true"
maxmemory="512m">
<source-path path-element="${FLEX_HOME}/frameworks"/>
<source-path path-element="${basedir}/src"/>
<source-path path-element="${basedir}/gestouch"/>
<compiler.library-path dir="${basedir}/lib" />
<compiler.external-library-path dir="${basedir}" append="true">
<include name="lib/*" />
</compiler.external-library-path>
<library-path dir="${basedir}/lib" includes="*.swc,*.ane" append="true"/>
<library-path dir="${SDK}/frameworks/locale/en_US" includes="*.swc" append="true"/>
</mxmlc>
</target>
If anyone has already managed to successfully include .ane using mxmlc, I would love to hear a solution.
Cheers guys!