devboy

“Build like you code” – now supporting ActionScript 3 & Flex

Recently I stumbled upon buildr, a build and dependency-management system written in Ruby, which caught my attention right-away. As I wasn’t really satisfied with my build strategies using Ant and Maven, mainly because of their inflexibility and the high amount of work it takes to maintain them, I immediately started digging deeper into buildr to find it to be the tool I was looking for, as it would also work nicely with my existing maven repositories.
My enthusiasm got a little damp when I couldn’t find an extension which supports ActionScript 3 & Flex development, despite the fact I’ve never touched a single line of ruby-code I just gave it a try anyway. And now here we are, 3 weeks later, I successfully managed to develop a buildr-extension which opens the door to buildr for flash-developers.

What is buildr exactly?

I won’t answer this question here, when all you need to know you can find on the buildr project page. Please take the time to browse around, and get an idea of what buildr does, how it works and how to customize it. This is important as buildr-as3 follows the same guidelines.

How to get started with buildr-as3?

Buildr is based on Ruby and RubyGems, so before you can get started you need to make sure you have them both(Ruby and RubyGems) installed correctly on your system. You can find installation instructions for Ruby on http://www.ruby-lang.org and for RubyGems on http://rubygems.org.
Once you got this working, installing buildr-as3 and buildr is going to be a no-brainer, just run the following command in a shell of your choice:

$ sudo gem install buildr-as3 (remove the "sudo" on windows)

This will install buildr-as3 as well as buildr, as buildr-as3 depends on it.
Now you are all set to build ActionScript 3 and Flex projects with buildr, the only thing missing is a project now. To make your life easier, I created an example project on github: http://github.com/devboy/buildr_as3_exampleproject.
Clone, fork or download this project and save it somewhere on your machine, than execute this command to compile it:

$ cd path/to/project
$ buildr compile

If everything worked as expected, you should get an output similar to the image at the top of this post.
That’s it for now, in my next post I will go into detail about writing buildfiles for your projects.

6 Responses to “Build like you code” – now supporting ActionScript 3 & Flex

  1. Pingback: Tweets that mention devboy » Blog Archive » “Build like you code” – now supporting ActionScript 3 & Flex -- Topsy.com

  2. Rasheed Abdul-Aziz says:

    I just wanted to pop in and say “Yay!”.
    Well done Dominic, this beats the pants of maven/ant/flexmojos for my use case. I don’t know why anyone would be a fan of declarative languages (like XML) for build tasks and dependency management.

    As for sprouts.. It’s really nice, but it seems to force feed the kitchen sink.. I’m wondering if they can’t utilize buildr for their build steps to help focus attention on this awesome little product.

  3. Pingback: Rails for zombies – Learn Ruby-on-Rails – devboy

  4. jankees says:

    Hi Dominic,

    I just wanted to try builder but i got this error:

    http://grab.by/8FzM

    I got no errors when i ran ‘sudo gem install buildr-as3′

    Do you know how to fix this?

  5. devboy says:

    Hi jankees,

    yes i know where that comes from. For demonstration i made a release of that project yesterday at the workshop. And now its mixed up with my development files.
    Check out the 1.0.2 tag in github, that should work: https://github.com/devboy/buildr_as3_exampleproject/tree/1.0.2

  6. jankees says:

    Thanks it works now!

Leave a Reply

devboy

Connect

Follow me on Twitter
Connect with me on Linked In