I'm having a custom JavaExec gradle task
which I currently use for generating several string resource files for android and other platforms.
I found out that when I'm using gradle directly, like this:
buildTypes {
debug {
resValue "string", "test", "test-value"
}
}
Gradle will generate me a
generated.xml
under
/build/generated/resValues/{debug}/values/
depending on my active {buildType}
For the gradle way it works, but I don't want to use gradle directly for generating my resValues. I want to use my custom script instead!
Well, but when my script generates for example a generated-custom.xml it does not work as it should. It generates the R.class file correctly, but when I want to use my generated string resources in a layout it won't find any of these.
So my question is: Where do I need to put the generated xml file, so that:
- The R.class is generated with these string items
- The string items can be used in layouts aswell (@string/generated_string_key)
Thanks!