A global variable is unknown when preprocessing xml
guy7373 opened this issue · 3 comments
I am using jcp with gradle in android studio
I declared a global variable (TEST_VAR) in preprocess.gradle.
When preprocessing the source TEST_VAR is known...
When preprocessing the resources TEST_VAR is unknown and an exception is thrown.
When declaring TEST_VAR as global in the xml the file is preprocessed correctly.
do you use the gradle script from the wiki to preprocess your android project?
the script from the wiki makes separated preprocessing for sources and resources, it means that global variables defined in sources will not be visible in resources, may be it is good approach in the case to use common config file (cfgFile) wilh defined global variables for both starts of preprocessor instances
I have edited the wiki page and added some extra info about workaround through config file with defined global variables
Works
Thanks you :)