You should use:
"/build/generated/res/something/${variant.dirName}/xml/"
dirName will ensure that the folder (and subfolders) is unique. There is
nothing to handle "something" though, so make sure you put something unique.
Our scheme is res/<task or type>/variant.dirName/
where <task or type> depend on what the folder is for. "rs" stands for
renderscript. This will be the res folder where the renderscript task drops
its .bc file which is the compiled renderscript code.
On Fri, Nov 28, 2014 at 8:06 AM, Pierre Degand <[email protected]>
wrote:
> Hi,
>
> I would like to generate some files at build time (an XML file and then
> add a reference to this XML into the Manifest of my app).
>
> I suppose the /build/generated/ folder is the place to put this kind of
> generated files.
>
> After studying how this folder works, with the `wearApp(':wear')`
> dependency, I learned that I should put my generated XML file into
> /build/generated/res/something/rs/flavorA/release/xml/
>
>
> but I don't want to hard code this path into my build script. Is there a
> way to retrieve this path dynamically, based on the current variant for
> example, without having to do something like
>
> "/build/generated/res/something/${variant.flavor}/${variant.buildType}/xml/"
>
>
> On a more generic side, how is the "something" part of the path used
> during the resource merging ? And why is there a "rs" part in the path ?
>
> Thank you very much for the explanations.
>
> Pierre D.
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com
Please do not send me questions directly. Thanks!
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.