proguard-rules.pro 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. # 配置目前还有点问题无法使用
  20. -keepattributes *Annotation*,Signature
  21. -keepclasseswithmembers class * extends java.lang.Exception { *;}
  22. #kotlin
  23. -keep class kotlin.** { *; }
  24. -keep class kotlin.Metadata { *; }
  25. -dontwarn kotlin.**
  26. -keepclassmembers class **$WhenMappings {
  27. <fields>;
  28. }
  29. -keepclassmembers class kotlin.Metadata {
  30. public <methods>;
  31. }
  32. -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
  33. static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
  34. }
  35. -keepclasseswithmembernames class * {
  36. native <methods>;
  37. }
  38. -keepclassmembers enum * { *;}
  39. -keep class kotlinx.coroutines.** {*;}
  40. # jvm平台的一些不存在的类
  41. -dontwarn java.awt.**
  42. -dontwarn javax.swing.**
  43. -dontwarn sun.misc.**
  44. -dontwarn org.jetbrains.kotlin.**
  45. # mirai 配置
  46. -keep class net.mamoe.mirai.qqandroid.QQAndroid.$Companion { *; }
  47. -keepclasseswithmembers class * extends net.mamoe.mirai.BotFactory{ *;}
  48. -keep class net.mamoe.mirai.console.** { *; }
  49. -keep class net.mamoe.mirai.contact.** { *; }
  50. -keep class net.mamoe.mirai.event.** { *; }
  51. -keep class net.mamoe.mirai.message.** { *; }
  52. -keep class net.mamoe.mirai.network.** { *; }
  53. -keep class net.mamoe.mirai.utils.** { *; }
  54. -keep class net.mamoe.mirai.* { *; }
  55. # ktor
  56. -keep class io.ktor.client.** { *; }
  57. -keepclassmembers class io.ktor.** {
  58. volatile <fields>;
  59. }
  60. # json
  61. -keep class kotlinx.serialization.json.** {*;}
  62. -keep class kotlinx.serialization.* {*;}
  63. # yaml
  64. -keep class org.yaml.snakeyaml.* {*;}
  65. -keep class org.yaml.snakeyaml.util.* {*;}
  66. # okhttp
  67. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  68. -dontwarn okhttp3.internal.platform.ConscryptPlatform