Created
October 20, 2023 22:36
-
-
Save emedinaa/8578bdef96a9d2515f6c448e42d1ba34 to your computer and use it in GitHub Desktop.
proguard rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-keep class com.app.demo.model.* { *; } | |
-keep class com.app.demo.remote.SomeResponse { <fields>; } | |
-keep class com.app.demo.SomeEntity { *; } | |
-keep interface com.app.demo.SomeInterface { *; } | |
-keepclassmembers class com.app.demo.SomeClass { | |
public static ** Companion; | |
} | |
-keep class com.app.demo.SomeClass { | |
public <methods>; | |
} | |
# Keep - Library. Keep all public and protected classes, fields, and methods. | |
-keep public class * { | |
public protected <fields>; | |
public protected <methods>; | |
} | |
-keepclassmembers class * implements java.io.Serializable { *; } | |
-keep, includedescriptorclasses class com.app.demo.remote.SomeResponse { *; } | |
# -- OkHttp -- | |
-dontwarn com.squareup.okhttp.internal.** | |
# https://www.guardsquare.com/manual/configuration/examples#serializable | |
-keepclassmembers class * implements java.io.Serializable { | |
private static final java.io.ObjectStreamField[] serialPersistentFields; | |
private void writeObject(java.io.ObjectOutputStream); | |
private void readObject(java.io.ObjectInputStream); | |
java.lang.Object writeReplace(); | |
java.lang.Object readResolve(); | |
} | |
# inner classes | |
-keep class com.xxx.A { *; } | |
-keep class com.xxx.A$B { *; } | |
# references | |
https://www.guardsquare.com/manual/configuration/examples | |
https://www.guardsquare.com/proguard | |
https://github.com/Guardsquare/proguard | |
https://community.guardsquare.com/ | |
https://playground.proguard.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment