How to exclude resource from dependency in gradle android project

883 views
Skip to first unread message

Zufar Fakhurtdinov

unread,
Apr 25, 2016, 4:05:32 PM4/25/16
to adt-dev

I have a gradle android project. I've set minifyEnabled true in my build.gradle

I want to exclude some resource files from dependencies. It's for example gwt.xml files and logging configuration files.

proguard copy all resource files by default. So, if I use proguard directly, I can write

-injars in.jar(!**/*.gwt.xml)

But how can I do it with gradle android plugin?

Actually I don't need any resources from certain dependencies. 

P.s. I know about

packagingOptions { exclude 'Proj.gwt.xml' }

It looks working with one file per exclude It's pretty unusable to list all files here.


Xavier Ducrohet

unread,
Apr 25, 2016, 4:10:10 PM4/25/16
to adt...@googlegroups.com
It's not possible at the moment. We do want to expand the packagingOptions to work using glob patterns but we haven't had a chance to do it yet.

--
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 adt-dev+u...@googlegroups.com.
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!
Reply all
Reply to author
Forward
0 new messages