Adding compiler arguments to mxmlc

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>

Advertisements

0 Responses to “Adding compiler arguments to mxmlc”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s




Savage’s Ramblings

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 545 other followers

Advertisements

%d bloggers like this: