0 Replies Latest reply on Oct 29, 2008 12:20 PM by martelera

    Automate build process using Apache Ant

    martelera
      Hello!

      I'm trying to automate my build process using Apache Ant based on "flex ant tasks". It's a complicated task given its lack of documentation. Here is my build script:

      <mxmlc file="${APP_ROOT}/UI/AIRWrapper/MyApp.mxml" output="${DEPLOY_DIR}/bin/MyApp.swf" keep-generated-actionscript="true">

      <load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>

      <compiler.library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
      <include name="*.swc"/>
      </compiler.library-path>

      <compiler.library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
      <include name="*.swc"/>
      </compiler.library-path>

      <source-path path-element="${APP_ROOT}/UI/Content/src"/>
      <source-path path-element="${APP_ROOT}/UI/Content/localization"/>
      <source-path path-element="${APP_ROOT}/UI/Content/resources"/>

      <library-path dir="${DEPLOY_DIR}/libs" append="true">
      <include name="DependentLib.swc" />
      </library-path>
      <external-library-path dir="${APP_ROOT}/UI/Content" append="true" />

      </mxmlc>

      The build is failing with the following error:
      [mxmlc] …
      [mxmlc] C:\Projects\MyProject\src\UI\AIRWrapper\MyApp.mxml(56): Error: Access of undefined property File.
      [mxmlc]
      [mxmlc] inputFile = File.documentsDirectory;
      [mxmlc]
      [mxmlc] C:\Projects\MyProject\src\UI\AIRWrapper\MyApp.mxml(61): Error: Call to a possibly undefined method FileStream.
      [mxmlc]
      [mxmlc] input = new FileStream();
      [mxmlc]
      [mxmlc] C:\Projects\ MyProject\src\UI\AIRWrapper\src\MyApp.mxml(62): Error: Access of undefined property FileMode.
      [mxmlc] ...

      Somebody have any clue why I'm getting this error?