I am trying to transfer assembly number from Hudson to Flex application.
I found an Adobe document ( http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html ) with conditional compilation, which seems to solve it, but I have to miss something .
So, in my ant build file, I have: -
<mxmlc file="${app.dir}/${application.name}.mxml" output="${dist.dir}/${application.name}.swf" context-root="${application.name}" debug="true" locale="${locales}" allow-source-path-overlap="true"> <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/> <compiler.library-path dir="${lib.dir}" append="true"> <include name="*.swc" /> </compiler.library-path> <define name="BUILD::BuildNumber" value="'20100707.800'"/> <source-path path-element="${src.dir}"/> <source-path path-element="${cfg.dir}"/> <source-path path-element="${locale.dir}" /> </mxmlc>
Then I try to get using
public static const buildNumber:String = BUILD::BuildNumber;
However, the compiler is rejected with:
SomeModel.as (31): col: 47 Error: access to an undefined BUILD object.
[mxmlc] private static const _buildNumber: String = BUILD :: BuildNumber;
Any suggestions?
flex compilation actionscript-3 const
Decado
source share