Proguard optimization


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


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


or I have to write this?

-optimizations *

Can I omit?


Thanks for your help.


You have to only remove -dontoptimize.

From documentation:


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

By : Samidh T

This video can help you solving your question :)
By: admin