Proguard optimization

832 views Asked by At

I readed the proguard documentation like 10 times, but I really don't understand one thing: if I put

 -dontoptimize

Optimization will disable, but if I want a full optimization, I have to only remove

-dontoptimize

or I have to write this?

-dontoptimize
-optimizations *

Can I omit?

-optimizations

Thanks for your help.

1

There are 1 answers

0
Pdksock On BEST ANSWER

You have to only remove -dontoptimize.

From documentation:

-dontoptimize

Specifies not to optimize the input class files. By default, optimization is enabled; all methods are optimized at a bytecode level.

-optimizations optimization_filter

Specifies the optimizations to be enabled and disabled, at a more fine-grained level. Only applicable when optimizing. This is an expert option.

So basically you cannot use both these options together as -optimizations option is only applicable when you are optimizing.

Example: If you use -optimizations "!foobar,*bar", it matches all names ending with bar, except foobar.

For more info check here https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/usage.html