Is there an Ant build script that will export a component to an swc? I have
written what seems to be a very basic one that exports a mxml component
using a script file but it doesn't work with the flex-config file.

build.xml -

<?xml version="1.0" ?>
<project default="main">
   <target name="main" depends="compile" description="Main target">
       <echo>
           Building the component for you
       </echo>
   </target>

   <target name="compile" description="Compilation target">
       <exec command="compc -load-config Countdown-config.xml"/>
   </target>

</project>

Countdown-config.xml -

<?xml version="1.0"?>
<flex-config xmlns="http://www.adobe.com/2006/flex-config";>
   <compiler>
       <source-path>
           <path-element>.</path-element>
           <path-element>C:\Documents and Settings\Judah\My Documents\Flex
Builder 2\Countdown</path-element>
       </source-path>
       <output>C:\Documents and Settings\Judah\My Documents\Flex Builder
2\ComponentTester\swc\Countdown.swc</output>
   </compiler>

   <include-classes>
       <class>Countdown</class>
   </include-classes>
</flex-config>

Reply via email to