In my project.properties file there is a property proguard.config and when i run ant it will run proguard. All of the following will cause proguard to run
proguard.config
proguard.config=
proguard.config=proguard.cfg
Is there a way within the properties file to turn proguard on/off?
Otherwise I am going to need to write a script to add/remove or rename the proguard.config property to control this. I would rather just get/set properties. I want the best solution for this. Right now I am coding replaceregexpr to rename the proguard.config to something else to turn off. Looking for a better solution and would like to know how others are controlling this?
A lot simpler way is to just have the line
or even better still leave it out altogether! That way proguard doesn't run at all.
set this property
in your app
build.gradle
Like this to disable in debug and release too:
Here is how it is done:
Do NOT set proguard.config=proguard.cfg in your project.properties file.
in your build.properties file set
Define these Macros if you are building Android so that debugging is always off:
Then set these conditions or similar to these depending on if you want to preserve debugging outside proguard builds:
No need to set proguard.config in the project.properties file at all.