I am trying to packages all the PNG resources of my Android application as 
WEBP images. All the resources will be in PNG format in project source 
code, but during build process i want to convert these resources to WEBP 
format using cwebp encoder and want android gradle plug-in to use these 
webp images to add into the apk instead of .png files.

Now what i thought was this :
Write a custom task in build.gradle which will convert all the images in 
directory
$buildDir/intermediates/res/< flavor>/< buildType>/drawable-xxxhdpi-v13/
have this depend on mergeResources(mergeflavorbuildTypeResources) task so 
that it is executed after the above directory has been created.
But I am not able to add this dependency as it gives error for no such task.

I also tried with :

myTask.dependsOn assemble

This does execute successfully but it packaged the png images only.

Questions :
A) From which path and using which task does android package the resources 
in APK in Gradle ?
B)  What else can i do to accomplish this ?

-- 
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