Using compiler constants with the task <compc / "> ant
I am converting an existing script assembly from <mxmlc /> to <compc /> to generate swc.
However, the assembly fails, which gives an error:
[compc] C:\xxxx\LogViewer.mxml(32): Error: Access of undefined property VERSION. [compc] [compc] private static const VERSION:String = CONFIG::VERSION; In my ant task, I have defined the following:
<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 did an excellent job, but now does not work.
What is the correct way to use compiler constants with compc?
+4
2 answers