O'Reilly logo

Adobe® AIR™ Bible by Jeff Yamada, Ryan Taylor, Benjamin Gorton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. Leveraging Ant to Automate the Build Process

Apache Ant (http://ant.apache.org) is a Java-based build tool. Unlike older solutions such as Make, Ant uses XML-based configuration files rather than shell-based commands, giving it the capability to be cross-platform rather than tied to a certain OS.

Ant first showed up in a small percentage of Flash development pipelines back in the early days of ActionScript 2.0. It was used to better integrate MTASC (an open-source, command-line compiler) into development workflows. With the addition of the Flex SDK in modern ActionScript development, more and more developers are beginning to use command-line compilers to compile their code, rather than rely on the Flash or Flex Builder IDEs to do it for them transparently.

Beyond simply giving you more control over the build process, using Ant along with command-line tools decouples you from being locked into using any particular IDE. For this reason alone, it is a very good idea for you to get familiar with Ant and begin leveraging it in your projects.

Getting Set Up

The Eclipse IDE includes Ant support right out of the box, so if you are running the plugin version of Flex Builder — or an alternative plugin such as FDT — you are ready to go. If you are using the stand-alone version of Flex Builder or wish to use Ant with a non-Eclipse-based tool such as FlashDevelop or TextMate, some additional setup is required.

Adding Ant view to the stand-alone Flex Builder IDE

Even though Ant view isn't ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required