Ant and ASDoc

After my personal little tragedy with ASDoc I started looking into some Ant scripts. After trying out a few yesterday (without any success) I decided I’d write my own.

At the hand of the Ant script made by Darron Schall and the one by Dave Williamson I put together my own.

If you’re interested in using it, download it, and extract the two files in the zip to the bin folder of the project you’d like to generate documentation for.
Next, open the project. In the navigator, right click build.xml and select Run As » 1 Ant Build.
..and off you go, after the console (in the bottom of your Flex screen) says you’re done, check out the asdoc folder (in bin).
However, before you go and try it out, please read through to the end of this post..

Note that if you’ve got your classes anywhere else than in (or below) com (as in com\rubenswieringa\ you should make a slight modification to the domainextensions property in the file.
Furthermore, in this file you can also customize the title of the documentation and the folder to which the docs will be outputted.

Also, apparently Ant support has to be enabled beforehand in a typical Flex installation, please read Peter Elst’s post regarding this subject.

Please don’t be shy and post a comment if you can’t get it to work or got something else to ask/tell..

10 thoughts on “Ant and ASDoc

  1. Hi, I have developed a desktop application using AIR. for generating AS Docs, i m using your code. but it gives me error as follows when i try to run it:

    “Error: Unable to locate specified base class ‘mx.core.WindowedApplication’ for component class ‘testAIR'”

    do i need to modify anything in build.xml to make it work for AIR app???

    Waiting for your suggestions….

  2. I am using this, and am new, so may have made silly mistakes. The Ant is failing for mxml components that are extending other mxml components. The error indicates that it is unable to locate specified base class.

    I know this is not an Ant issue but more of my configuration of asdoc.

  3. Pingback: LyraSpace » Blog Archive » Developing Flex with ASDoc in mind

  4. i am not allowed to post the ant tags? so…
    arg line=”-load-config ${FLEX_HOME}/frameworks/air-config.xml”
    arg line=”-target-player 10.0.0″

Comments are closed.