Shlublu Shlublu - 1 year ago 107
Android Question

How to modify proguard-android-optimize.txt with AndroidStudio 2.2?

With Android Studio 2.2 and the new build system, the ProGuard files available in

are no longer used:

2.2.0-alpha4 (2016/6/23)


ProGuard files returned by
are distributed with
the plugin now, the ones in
are no longer used.

I used to use a modified version of
suitable for my needs. Now, the file
located in
is generated at build time.

So how can I do now, should there be a way?

Of course, I can (probably?) modify each and every project-specific
files to reach the same goal, but the advantage of changing
was to do it once for all.

Answer Source

Add a ProGuard file to the proguardFiles property from outside of the project:

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
        '', '/path/to/'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download