Stop Coding!

The Unofficial Flex Compiler Blog

Coming Soon: Ant Tasks for HFCD

with 2 comments

Since the last update, I’ve been working on bugs and of the many bugs I fixed, 4 of them are critical enough that I think I should update HFCD again this weekend. One of them has been around forever and the rest of them are Windows-related (I really should spend more time on Windows!).

Also, I’ve been working on some Ant tasks for HFCD. The testing is almost done so I think they are likely to be included in the next HFCD update.

So, what it’s like in build.xml? Take a look:

<project name="MyProject" default="main" basedir=".">
    <taskdef name="hfcd" classname="hellfire.tools.ant.HFCD"/>
    <property name="helloworld.dir" value="${basedir}/helloworld"/>
    <property name="myLib.dir" value="${basedir}/myLib"/>
    <target name="main">
        <hfcd>
            <watcher>
                <fileset dir="${basedir}" includes="**/*">
                    <exclude name="build.hfcd/**/*"/>
                    <exclude name="apps/**/*"/>
                    <exclude name="libs/**/*"/>
                    <exclude name="build.xml"/>
                </fileset>
            </watcher>
            <application id="helloworld" depends="myLib"
                    output="${basedir}/apps/helloworld.swf"
                    description="Building apps/helloworld.swf">
                <fileset file="${helloworld.dir}/src/helloworld.mxml"/>
                <configuration>
                    -library-path "${basedir}/libs/myLib.swc"
                </configuration>
            </application>
            <library id="myLib" output="${basedir}/libs/myLib.swc">
                <components>
                    com.foo.Bar
                    com.foo.Baz
                </components>
                <components>
                    <uri>http://www.foobar.com/myLib</uri>
                </components>
                <components>
                    <fileset file="${myLib.dir}/src/com/foo/Foo.as"/>
                </components>
                <configuration>
                    -accessible=true
                    -namespace http://www.foobar.com/myLib
                                 "${myLib.dir}/manifest.xml"
                    -source-path "${myLib.dir}/src"
                <configuration>
            </library>
        </hfcd>
    <target>
    <target name="clean">
        <delete file="${basedir}/apps/helloworld.swf" />
        <delete file="${basedir}/libs/myLib.swc" />
        <hfcd clean="true" />
    <target>
</project>

Don’t worry about the syntax. Once it’s out there, I’ll blog about it in more details.

What’s cool about this is that you can now hook up HFCD with your favorite Flex IDE (as long as your favorite IDE supports Apache Ant)!

Written by Clement Wong

December 16, 2009 at 6:21 pm

2 Responses

Subscribe to comments with RSS.

  1. […] last post showed an example of build.xml using the ant tasks for HFCD. I’ll make the user’s guide […]

  2. […] Coming Soon: Ant Tasks for HFCD […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: