I've created a macro to compile .swf
from .as
sources (Flash projects) :
<macrodef name="compile">
<sequential>
<mxmlc file="@{input}" output="@{output}"/>
</sequential>
</macrodef>
Once created, I call it in my build.xml
:
<target name="compile.app1">
<compile input="App1.as" output="app1.swf"/>
</target>
To avoid compiling my App1
each time, I've added the task <uptodate>
in <compile>
:
<macrodef name="compile">
<sequential>
<uptodate property="swf.uptodate" targetfile="@{output}">
<srcfiles dir="@{src}" includes="**/*.as"/>
</uptodate>
<mxmlc file="@{input}" output="@{output}"/>
</sequential>
</macrodef>
But at this point, I don't know how I can bind the swf.uptodate
property with the mxmlc
task. Here is what I would like to do :
IF NOT swf.uptodate
EXECUTE mxmlc
ELSE
do nothing.