February 27, 2012
Posted by on
I’ve only been using IntelliJ for a few weeks now, but I love it. I see myself using this as my primary IDE for all things Apache Flex as time moves forward.
One question that has been asked quite frequently on the Apache Flex Dev mailing list is “How do I compile the Apache Flex SDK with IntelliJ?” Well, since a picture is worth a thousand words, a video on the subject must be worth… umm.. (11 minute video, at 15 frames a second, times the value of pi… ) 9,900,000 words!
- Grab the Requirements :
- Java JDK 1.5, 1.6 or 1.7
- Adobe Open Source Flex SDK 4.6 (needed for the compiler at the time of writing)
- IntelliJ with ANT, Flex and Java plugins
- Create a new Project
- Create a new Java Module. Name it anything you wish.
- Create a new Flex Module within that last Module. It must be named “frameworks”
- Unzip the contents of the Open-Source Flex SDK into your Java Module EXCEPT the frameworks directory.
- Check the frameworks directory from the Apache SVN (https://svn.apache.org/repos/asf/incubator/flex/trunk) . Make sure it ends up in the frameworks directory.
- Load up the ANT tab, and add the /frameworks/build_framework.xml file.
- Hit the “Run” icon to start the compile.
- Drink a beer, or take a shower — depending on what the clock says.
After about 7 minutes or so (my computer compiles it all in 422 seconds on average), you should have a successful build, and a custom-compiled SDK!
NOTE: The reason why we created two modules is so that you can create your own branch (or switch to somebody else’s branch) without having a whole lot of heart-ache. All you would need to do is go to the framework module and change the branch you are checking out from. This will allow you to create patches and submit them into JIRA against the current “patches” branch, instead of the trunk.