Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude this particuar class from ProGuard obfuscation

I want to exclude this class from being obfuscated by ProGuard

- com.example.myapp.ThisParticularClass.java

How can I do that?

I looked into other answers but they are about packages, or class members or using gson annotations

PS: And what if ThisParticularClass extends from another class, should I keep the parent class from obfuscation as well?

like image 809
Kaloyan Roussev Avatar asked Oct 25 '25 14:10

Kaloyan Roussev


1 Answers

Use such statement:

-keep class com.example.myapp.ThisParticularClass

or:

-keep public class * extends com.example.myapp.ThisParticularClass
like image 168
R. Zagórski Avatar answered Oct 28 '25 03:10

R. Zagórski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!