The other day I was trying to determine how to add additional compiler arguments in an ANT build file when working with Flex’s mxmlc task. I was surprised to discover that Google was fruitless to my requirements. I therefore thought I needed to rectify this by writing a post!
So if you require to add additional compiler arguments through ANT then you need to use the includes
tag as shown in the following snippet:
<target name="buildFlexProject"/>
<echo message="build MyProj"/>
<property location="${src.dir}/MyProj" name="MyProj.dir"/>
<mkdir dir="${stage.air.dir}/MyProj"/>
<mxmlc file="${MyProj.dir}/src/MyProj.mxml"
output="${stage.air.dir}/MyProj.swf">
<source-path path-element="${MyProj.dir}/src"/>
<compiler.library-path append="true"
dir="${stage.lib.dir}">
<include name="*.swc"/>
</compiler.library-path>
<compiler.library-path append="true"
dir="${MyProj.dir}/libs">
<include name="*.swc"/>
</compiler.library-path>
<includes>mx.managers.systemClasses.MarshallingSupport</includes>
</mxmlc>
</target>