Shlublu Shlublu - 2 months ago 24
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.


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

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
        '', '/path/to/'