I know I can use a combination of ant & flex ant tasks for automating builds. However, I’m unclear on how to compile all the mxml and actionscript files of an app. For example, does the build file below compile just the Main.xml file or all files in the app?
<project name="flex-app-builder">
<property name="FLEX_HOME" value="C:/flex/sdk"/>
<property name="APP_ROOT" value="apps"/>
<property name="DEPLOY_DIR" value="C:/builds/flex/"/>
<target name="main">
<mxmlc
file="${APP_ROOT}/Main.mxml"
output="${DEPLOY_DIR}/Main.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true"
/>
</target>
</project>
Your question shows you aren’t too clear on how SWFs are built.
MXMLC builds SWFs for which the root file is either an Application or Module. It builds the SWF starting with that class, and linking in any used classes / libraries.
COMPC builds SWCs which just requires a list of files. It builds the SWC containing any classes which you specify to be built.
MXMLC is for building an application or module. (Only the files needed)
COMPC is for building a library. (All the files specified)
Your question shows MXMLC, which means that any classes referenced by Main.mxml (and any classes referenced by them, and so on) will be built into Main.swf to be used as an application (or module depending on the root tag in Main.mxml)