proguard-rules.pro 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. #-keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. # 保护代码中的Annotation不被混淆
  20. # 这在JSON实体映射时非常重要,比如fastJson
  21. -keepattributes *Annotation*
  22. # 避免混淆泛型
  23. # 这在JSON实体映射时非常重要,比如fastJson
  24. -keepattributes Signature
  25. # 抛出异常时保留代码行号
  26. -keepattributes SourceFile,LineNumberTable
  27. -ignorewarnings
  28. # 保留方法参数名字
  29. -keepparameternames
  30. # 避免资源混淆
  31. -keep class **.R$* {*;}
  32. # 不混淆指定的包名称,防止不同的库混淆后的类名冲突,比如都是 a.a.a.a
  33. -keeppackagenames com.tencent.qcloud.tuikit.*
  34. # 以下类不混淆
  35. -keep public class com.tencent.qcloud.tuikit.tuipoll.bean.PollBean{*;}