0 Replies Latest reply on May 24, 2010 9:08 AM by 1ndivisible

    RSLs ANT and <java>

    1ndivisible Level 1

      Is there any  way I can pass an arbitrary number of RSLs into an ANT Macrodef?

       

      I am currently passing in sets of paths defined outside the macro for  the -source-path and -library-path args, but I can't do this for RSLs as each RSL takes at least 2 arguments.

       

      At the moment I am forced hard-code the number of RSLs into the Macrodef as separate arguments:

       

      <macrodef name="mxmlc">
              ...
          <attribute name="rsls.1.args"/>
          <attribute name="rsls.2.args"/>
          <attribute name="rsls.3.args"/>
          <attribute name="rsls.4.args"/>
          <sequential>
             <java jar="${flex.sdk.mxmlc.jar}" dir="${flex.sdk.frameworks}" fork="true" failonerror="true">
                ...
                <arg value="-runtime-shared-library-path=@{rsls.1.args}"/>
                <arg value="-runtime-shared-library-path=@{rsls.2.args}"/>
                <arg value="-runtime-shared-library-path=@{rsls.3.args}"/>
                <arg value="-runtime-shared-library-path=@{rsls.4.args}"/>
             </java>
          </sequential>
      </macrodef>

       

      Where a single argument is built outside like so:

       

      (output)framework.rsl.args = ${flex.sdk.framework.swc},${(output)rsls.framework.swz},${(output)policy.xml},${(output)r sls.framework.swf},${(output)policy.xml}

       

      I can't set defaults for them as a default value of "" seems to prevent the compiler compiling against any of the RSLs, otherwise I could add 10 separate attributes all with defaults of "" and use as many as I needed.

       

      Is there a solution to this problem?