Command Line Build a Flash Builder 4 Premium Feature
The Flash Builder is great at organizing projects and all the build dependencies that revolve around large projects. Creating build scripts (typically ant build scripts using mxmlc/compc Flex ant tasks) can be complex and hard to recreate all the subtleties of the Flash Builder project build process. There is a new feature that is part of Flash Builder 4 Premium called Command Line Build that might help out in this area. Let me describe the feature first then talk about the issues.
This feature provides a new Adobe ant task called
fb.exportReleaseBuild. This task is meant to run in connection with a headless execution of Flash Builder 4 to export your specific project’s release build. Basically this does the same thing as you would in Flash Builder 4 as Export -> Release Build. To use this I provide the example/scripts below for a Flash Builder 4 workspace called “PremiumFeatureWebinar” with a “ExampleApplication” project inside the workspace.
<fb.exportReleaseBuild project="ExampleApplication" />
Shell Script to run Flash Builder 4 in headless mode on Mac OS (Windows would be similar but a bat/exe file):
# works with either FlashBuilder.app or Eclipse.app
"/Applications/Adobe Flash Builder 4/Adobe Flash Builder 4.app/Contents/MacOS/Adobe Flash Builder 4" --launcher.suppressErrors -noSplash -application org.eclipse.ant.core.antRunner -data "$WORKSPACE" -file "$(pwd)/build.xml" main
Now the issues, well first you need a copy of a licensed Flash Builder 4 Premium. Which also means it only runs on Windows and Mac OSX, where typically automation builds are done on Linux. Either way its good to be aware of this feature to use in a crunch or for testing other build scripts against a known good release build with Flash Builder 4′s build process.
I show an example of this new feature running along with some other Flash Builder 4 Premium features in a webinar found here.