flex - Using compiler constants with <compc /> ant task -


i'm converting existing build script <mxmlc /> <compc /> generate swc.

however, build failing, giving error:

[compc] c:\xxxx\logviewer.mxml(32):  error: access of undefined property version. [compc] [compc] private static const version:string = config::version; 

in ant task, have following defined:

    <compc compiler.as3="true" output="${output.dir}/${swc.name}.swc" incremental="true" fork="true" maxmemory="512m" compiler.show-deprecation-warnings="false">         <load-config filename="${flex_home}/frameworks/flex-config.xml" />         <source-path path-element="${srcdir}" />         <include-sources dir="${srcdir}" includes="*" />         <external-library-path dir="${swc.libs.dir}" append="true">             <include name="*.swc" />         </external-library-path>         <external-library-path dir="${output.common.swc.dir}" append="true">             <include name="*.swc" />         </external-library-path>         <compiler.define name="config::version" value="${build.version}" />         <compiler.define name="config::release" value="${config.release}" />         <compiler.define name="config::debug" value="${config.debug}" />         <compiler.define name="config::automation" value="false" />     </compc> 

this approach worked fine task, failing.

what's correct way use compiler constants compc?

string values need put in single quotes. instance:

<compiler.define name="config::version" value="'${build.version}'" /> 

the flex ant tasks incredibly frustrating, due lack of documentation. struggled while until figured out.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -