We were tying to skip proguard operation on external plugins we use. What is the proper way to do it?
We see two options currently.
- Specify all the proguard rules in one single proguard-user file
- Create build.gradle for each plugin project and set minifyEnabled to false.
First option we see it too tedious as it will just bloat up.
Second option we tried but we see it doesn’t seem to respect the flag. Still we are thrown with lot of errors about proguard warnings.
Please suggest.
Thanks.
you can probably have a single proguard configuration file and tell it to exclude certain things.
I’m also interested in this topic. The only way that I’ve found is to use a unique proguard-user file and specify the enteire list of namespace/classes to exclude. Many plugins report information in their documentation.
A way to exclude enteire aar/jar files will be very useful.
1 Like
You mean to use proguard-user.txt file which will be placed under Assets/Plugins/Android by unity?
Problem with this is its too difficult to manage on adding a new plugin. If plugin managers have option to defined the proguard with in their own project (option 2 i mentioned above), then it eases a lot.
Makes sense?
Starting with Unity 2017.1.1, custom gradle files are supported for libraries as well. it may be possible to define a proguard file to be used for a particular library. haven’t tried it though so it’s all in theory.
@liortal Yes. But library’s proguard config in build.gradle is not considered. However I yet need to test once what Yury pointed.
I’ll try it with one of my plugins this week.