Compile Flex component with Jpg image resource, and css file : Ant Script « Development « Flex






Compile Flex component with Jpg image resource, and css file

 
 

<!--
Code from Flex 4 Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1) proper attribution to Adobe is given as the owner of the user guide; and 
  (2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->



<project name="My Component Builder" basedir=".">
    <taskdef resource="flexTasks.tasks" classpath="${basedir}/flexTasks/lib/flexTasks.jar" />
    <property name="FLEX_HOME" value="C:/flex/sdk" />
    <property name="DEPLOY_DIR" value="c:/jrun4/servers/default/default-war" />
    <property name="COMPONENT_ROOT" value="components" />
    <target name="main">
        <compc output="${DEPLOY_DIR}/MyComps.swc" include-classes="custom.MyButton custom.MyLabel">
            <source-path path-element="${basedir}/components" />
            <include-file name="f1-1.jpg" path="assets/images/f1-1.jpg" />
            <include-file name="f1-2.jpg" path="assets/images/f1-2.jpg" />
            <include-file name="f1-3.jpg" path="assets/images/f1-3.jpg" />
            <include-file name="f1-4.jpg" path="assets/images/f1-4.jpg" />
            <include-file name="main.css" path="assets/css/main.css" />
        </compc>
    </target>
    <target name="clean">
        <delete>
            <fileset dir="${DEPLOY_DIR}" includes="MyComps.swc" />
        </delete>
    </target>
</project>

   
  








Related examples in the same category

1.Generate ASDoc for all components in the Spark namespace
2.Generates ASDoc for MX Button including the parent classes that this control inherits its members from.
3.Using Ant to create Html wrapper for Flex application
4.mxmlc task explicitly defines the source-path and library-path options