Accessibility
David Flatley

Dave Flatley

pxldesigns.com

Table of Contents

Created:
16 March 2009
Products:
Flex

Using Flex Ant Tasks to build Flex projects – Part 1: Creating a build script for Flex

When working in a team environment with other developers, it's important, and considered a best practice, to standardize the build process of your application. Most large-scale, enterprise projects use source control and automated tools to enable the team to work on the same code and keep track of numerous software revisions, while still producing repeatable builds. Many Java developers use Ant build scripts to automate the process of building new releases.

Things can get hectic when new releases of your Flex application are required with new builds of an enterprise project. Whose job is it to hand over the actual SWF file for a release? What about future builds? You, as a Flex developer, might be excited to know that you can use Adobe Flex Ant Tasks to build your projects using Ant.

With Flex Ant Tasks, you can create a script that makes your project's build process quick, painless, and repeatable. On top of that, if your team includes Java developers and Flex developers the Java developers can invoke your build script as part of their own build to get the latest version of your SWF file. Because the build no longer depends solely on one developer deploying the SWF file from Flex Builder, it provides the rest of the team with more flexibility in deploying the application.

In this article, I'll show you how to create a basic build script for a typical Flex project. For more information on Java Ant tasks, see the links in the Where to go from here section at the end of this article.

Requirements

In order to make the most of this article, you need the following software and files:

Flex Builder 3

Sample files:

Prerequisite knowledge

A Basic knowledge of Flex 3 and working knowledge of object-oriented programming principles is needed. Knowledge of compiling Flex applications from the command prompt is not vital, but extremely helpful.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

About the author

Dave Flatley is the President/CTO of PXL Designs, LLC. He has worked as a web developer consultant in the New York City Metropolitan area for over nine years with a focus on the Flash Player in conjunction with other related web technologies. Over his career, Dave has worked on web and desktop applications for such companies as Intel, Fidelity, Fleer, Redmond Software, DRS Technologies, Merrill Lynch, and Selective Insurance.