Hi Xavier, 

Thanks for the answer. I'll answer here for both threads (sorry about it).

I was actually building an Android Wear variant-compatible packaging plugin 
but I missed the release of this feature in android-gradle 0.14.3.

I'll look of this new feature.

Merci!

Le mardi 2 décembre 2014 20:49:33 UTC+1, Xavier Ducrohet a écrit :
>
> We have several generated res folder by different tasks. It's better to 
> not have different task dump files in the same res folder in case one 
> overwrite a file created by another task (this will trigger an error in the 
> res merger instead of silently overwriting the res file with 
> non-deterministic behavior depending on which task runs last).
>
> So there isn't a single generated task. Are you trying to create a new 
> generated res folder for your own generated resources?
> In that case, use the variant.dirName as I mention in the other thread.
> You will also need to add the res folder manually to the sourceset of the 
> variant.
>
> this should work:
> project.android.sourceSets.maybeCreate(variant.name) {
>   res {
>     srcDirs = [...]
>   }
> }
>
> On Mon, Dec 1, 2014 at 12:25 AM, Pierre Degand <[email protected] 
> <javascript:>> wrote:
>
>> With android-gradle, I can get the processResources task's associated 
>> directory using the Output API with :
>> android.applicationVariants.all { variant -> 
>>   variant.outputs.each { output -> 
>>     def resDir = output.processResources.resDir; 
>>     // for flavorARelease variant, this resDir is : // 
>> build/intermediates/res/flavorA/release/ 
>>   } 
>> }
>>
>> Now, I would like to retrieve, *without hardcoding it*, the folder 
>> /build/generated/res/something/rs/flavorA/release/
>>
>> This folder might be retrievable with the generateResources task but I 
>> can't find a way to get this specific task. 
>>
>> tasks["generate${variant.name.capitalize()}Resources"] may not be a good 
>> idea ?
>>
>> On a more generic note, can someone explain how works the resource 
>> merging with "generated/" folders ? why are there intermediate folders in 
>> the hierarchy (something/rs) and not simply 
>> (/generated/res/flavorA/release) ?
>>
>> Thank you for your help.
>>
>> -- 
>> 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] <javascript:>.
>> 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.

Reply via email to