proguard 混淆唯一方法名

proguard obfuscation unique method name

我在使用 Proguard 时遇到了一些问题我想混淆我的 java 程序但是当方法有注释时我需要有唯一的方法名称但是当方法有不同的参数时 Proguard 不给出唯一的名称

我之前说的形象

Proguard 配置

-obfuscationdictionary ./dictionary

-classobfuscationdictionary ./dictionary

-packageobfuscationdictionary ./dictionary

-dontshrink
-dontoptimize
-dontusemixedcaseclassnames
-useuniqueclassmembernames
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
-dontwarn
-ignorewarnings



# Also keep - Enumerations. Keep the special static methods that are required in
# enumeration classes.
-keepclassmembers enum  * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

# Also keep - Database drivers. Keep all implementations of java.sql.Driver.
-keep class * extends java.sql.Driver

# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI,
# along with the special 'createUI' method.
-keep class * extends javax.swing.plaf.ComponentUI {
    public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
}

# Keep - Native method names. Keep all native class/method names.
-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
    native <methods>;
}

所以我希望你能帮助我。

它的工作原理是这样的:

-keep,allowobfuscation @interface org.springframework.messaging.simp.annotation.SubscribeEvent
-keepclassmembers class * {
    @org.springframework.messaging.simp.annotation.SubscribeEvent *;
}