How proguard rules can impact my project while Debugging

from the CommonsWare Community archives

At June 26, 2019, 7:35am, Ven asked:

I want to know how to implement Unit level Debug,Component Level debug and Production Level Debug using Proguard


At June 26, 2019, 10:55am, mmurphy replied:

I do not use ProGuard for debug builds, so I am afraid that I cannot help you.


At June 26, 2019, 12:26pm, Ven replied:

Okay,
could you help me on Proguard (how to write Proguard rules to disable/suppressed log statements during compilation at Component Integration , Application Integration and System Integration Phase.


At June 26, 2019, 12:51pm, mmurphy replied:

I am sorry, but I have not performed that sort of configuration.

For production code, I do not use Log directly. I would use Timber or some other wrapper library, one that has hooks for turning off debug logging, integrating logs with crash reporters. etc. See https://stackoverflow.com/a/2466662/115145 for more on this, which also has some notes about your desired Proguard solution.