proguard-rules.pro 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #表示proguard对代码进行迭代优化的次数,Android一般为5
  20. #-optimizationpasses n
  21. -keep class com.benyanyi.viewbind.*
  22. -keep class com.benyanyi.viewbind.**{*;}
  23. -keep class com.benyanyi.viewbind.annotation.*
  24. -keep class com.benyanyi.viewbind.init.*
  25. -keep class com.benyanyi.viewbind.inject.*
  26. -keep class com.benyanyi.viewbind.listener.*
  27. -keepattributes *Annotation*
  28. -keepclassmembers class com.benyanyi.viewbind.annotation.*{*;}
  29. -keepclassmembers class com.benyanyi.ViewBind.ViewBind.**{*;}
  30. -keep class com.benyanyi.ViewBind.ViewBind {
  31. public <methods>;
  32. }
  33. -keepattributes Signature
  34. # 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆
  35. -keepclassmembers class * {
  36. void *(**On*Listener);
  37. }