1515#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616# public *;
1717#}
18+
19+ -keepparameternames
20+ -renamesourcefileattribute SourceFile
21+ -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,EnclosingMethod
22+
23+ # Preserve all annotations.
24+
25+ -keepattributes *Annotation*
26+
27+ # Preserve all public classes, and their public and protected fields and
28+ # methods.
29+
30+ -keep public class * {
31+ public protected *;
32+ }
33+
34+ # Preserve all .class method names.
35+
36+ -keepclassmembernames class * {
37+ java.lang.Class class$(java.lang.String);
38+ java.lang.Class class$(java.lang.String, boolean);
39+ }
40+
41+ # Preserve all native method names and the names of their classes.
42+
43+ -keepclasseswithmembernames class * {
44+ native <methods>;
45+ }
46+
47+ # Preserve the special static methods that are required in all enumeration
48+ # classes.
49+
50+ -keepclassmembers class * extends java.lang.Enum {
51+ public static **[] values();
52+ public static ** valueOf(java.lang.String);
53+ }
54+
55+ # Explicitly preserve all serialization members. The Serializable interface
56+ # is only a marker interface, so it wouldn't save them.
57+ # You can comment this out if your library doesn't use serialization.
58+ # If your code contains serializable classes that have to be backward
59+ # compatible, please refer to the manual.
60+
61+ -keepclassmembers class * implements java.io.Serializable {
62+ static final long serialVersionUID;
63+ static final java.io.ObjectStreamField[] serialPersistentFields;
64+ private void writeObject(java.io.ObjectOutputStream);
65+ private void readObject(java.io.ObjectInputStream);
66+ java.lang.Object writeReplace();
67+ java.lang.Object readResolve();
68+ }
69+
70+ # Your library may contain more items that need to be preserved;
71+ # typically classes that are dynamically created using Class.forName:
72+
73+ # -keep public class mypackage.MyClass
74+ # -keep public interface mypackage.MyInterface
75+ # -keep public class * implements mypackage.MyInterface
0 commit comments