apache-flexantmxmlc

Ant MXMLC task with arbitrary list of source/lib paths?


Does anyone know of a way to use the mxmlc Flex Ant task with a user-defined list of source or library paths?

The user should be able to define an arbitrary list of source and/or library (.swc) paths in an Ant properties file and the build file can use these values in the mxmlc task.

Are there any tricks (maybe use filtering/string replacing) to get this working?


Solution

  • Don't know if this helps, but you can include an external XML in your Ant build file:

    <?xml version="1.0" ?>
    <project name="test" default="test" basedir=".">
    
      <target name="setup">
        ...
      </target>
    
      <import file="./common.xml" />
    
    </project>
    

    I ran across your question, looking for a way to define the library (and source path) definitions in external files. Looping through a list of defined properties seems somewhat problematic to me, since you would possibly have to define a list of library paths as well as sub-lists of files in each defined path in the list.

    Seems that including external files defining the library and various source paths might be a better and just as extensible way to go.