The Master Flex ANT File

When this is all done and running, listen closely. Somewhere in the distance you can hear “I HAVE THE POWER!“. Trust me, it’s being said – or maybe that’s just me.

Seriously though, at this point you have one bad-ass ANT build file that will work right into your continuous integration script. Now you can make a release quality build, document it, and run both unit tests and automated tests against your application.

Final Touches
One final task I would include in this master build file is the zipped up application with all of the information from the deploy folder – all packaged up and ready to ship. This simple addition is the last thing to take place, the code is included below.

 

This target selects a specific folder (the deploy folder) and zips it up into a single file with the same name of the Application.

The Final Application

Get Adobe Flash player


The final application – view source enabled.

Recreating My Projects
Below is a zip file of all the projects that were created for this series and a short explanation of what can be found in each project.

Unit Test Project Folder
The Unit Test Project Folder
This project includes the FlexUnit tasks and the required SWCs to run the TestRunner from Flex/Flash Builder. On top of that, this project includes the build and property scripts to run the unit tests from ANT without the application.

Application Project Folder
The Main Project Folder
This project includes the master build.xml and build.properties files along with the necessary code to run the basic application and FlexMonkey tests. The build file is dependent on both the library and unit test projects to be able to run completely. The main project though can be run in Flex/Flash Builder without the other libraries.

Library Project Folder
Library Project Folder
This project includes the code necessary for the “SuperLabel” component and flextasks. In addition to the base project I have included the build scripts to build the actual library by itself without the main application.
Finally we have the project files all zipped up into one file for your consumption.
Projects – Zip Folder containing the Library, Application, and Unit Test Projects.

Share

Comments (7)

Tom GruszowskiFebruary 9th, 2010 at 11:19 am

Good example, the most confusing part of any Ant file is an easy way to include assets ( like *.png) using the compc compiler. Have you found a good way to do that without manually including all assets 1 at a time? Basically do include an entire folder.

Jonathan CamposFebruary 9th, 2010 at 11:31 am

Yup, check back in the series for non embedded assets.

[...] on my previous Continuous Integration series I felt there were a few more points that I needed to cover to help those others that may be running [...]

Flex 4 com ANT « iuricmpJuly 28th, 2010 at 1:53 pm

[...] Exemplo de integração de vários projetos, processo bem semelhante ao que eu necessitava: http://unitedmindset.com/jonbcampos/2010/02/09/the-master-flex-ant-file/ [...]

[...] Eclipse Plugin RobotGaiaAnt SWC / RSL Ant Scripts Master Flex Ant File GitHub Ant Scripts PureMVC Generator Ant RobotLegs Ant [...]

DavorianOctober 28th, 2010 at 11:18 am

Good Work ;-)

Masterflex BaseJune 17th, 2011 at 6:23 pm

[...] The Master Flex ANT File | Jonathan Campos' Blog The Master Flex ANT File. When this is all done and running, listen closely. Somewhere in the distance you can hear “I HAVE THE POWER!“ Trust me, it's being said – or maybe that's just me. Seriously though, at this point you have one In addition to the base project I have included the build scripts to build the actual library by itself without the main application. Finally we have the project files all zipped up into one file for your consumption. [...]

Leave a comment

Your comment