views:

1093

answers:

1

So, what I have is a Flex application that is comprised of about 20 modules that are loaded at runtime. Each module is it's own project in Flex Builder and what I'd like to do is have some way to create a release build of all of them without having to go to each project and selecting Project->Export Release Build...

How can I do such a thing?

+3  A: 

If you have a complex project it might be worth creating an ant build task. This lets you have very specific control over the build process and parameters.

You can download ant from the website (manual here) . There is a version that's included with eclipse, but I prefer to run it through the command lines.

Flex builder comes with an ant library that defines tasks to build actionscript and mxml files. There's some documentation here

For instance, this is a sample mxmlc task that you can do by running 'ant production-compile' :

<target name="production-compile">
     <mxmlc file="myApp.mxml"
      show-actionscript-warnings="false"
      output="myApp.swf"
      debug="false"
      optimize="true"
      >

      <default-size width="800" height="600"/>
      <default-frame-rate>60</default-frame-rate>
        </mxmlc>
</target>

You can add mxmlc tasks for each of your modules, and this will let you build the whole application with one command.

marketer
Yep, Ant is pretty much the same way to go here.
cliff.meyers
awesome - thanks for the thorough answer, now to figure out ant! :P
onekidney