How to implement 'includes' in MXMLC Ant Task?

I’m trying to figure out how to use the ‘includes’ feature in my MXMLC Ant task. I know how to do it with the Ant command line, but I’m stuck when it comes to the task itself.

Here’s what I’ve tried in the MXMLC Ant task:

<mxmlc file="${source.directory}/${project.name}.mxml" maxmemory="512m">
    <includes>
        <symbol>TestControllerClass</symbol>
    </includes>
</mxmlc>

But this doesn’t seem to work. Can anyone help me figure out the correct syntax for including symbols in the MXMLC Ant task? I’d really appreciate any guidance on this. Thanks in advance!

I’ve dealt with this issue in my projects before. The ‘includes’ feature in MXMLC Ant task isn’t straightforward, but there’s a workaround. Instead of using , try the <compiler.include-libraries> tag. Here’s an example:

This method allows you to include specific libraries or SWC files that contain the symbols you need. Make sure the path and filename are correct for your setup. This approach has worked reliably for me in similar situations.

I’ve encountered this issue before, and it can be a bit tricky. In my experience, the ‘includes’ feature in the MXMLC Ant task is actually handled differently than the command line version. Instead of using an tag, you need to use the tag within your task. Here’s an example of how I’ve successfully implemented it:

<mxmlc file="${source.directory}/${project.name}.mxml" maxmemory="512m">
    <keep-as3-metadata name="TestControllerClass" />
</mxmlc>

This approach has worked well for me in preserving specific symbols during compilation. Remember to replace ‘TestControllerClass’ with the actual symbol you want to include. Also, you can add multiple tags if you need to include several symbols. Hope this helps solve your problem!

hey mate, i ran into this too. try using the tag instead. it lets u specify a custom config file where u can put ur includes. like this:

then in ur custom-config.xml, add the includes there. works like a charm!