proguard-rules.pro 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. -keep class com.tencent.** { *; }
  20. # When editing this file, update the following files as well:
  21. # - META-INF/com.android.tools/proguard/coroutines.pro
  22. # - META-INF/com.android.tools/r8/coroutines.pro
  23. # ServiceLoader support
  24. -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
  25. -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
  26. # Most of volatile fields are updated with AFU and should not be mangled
  27. -keepclassmembers class kotlinx.coroutines.** {
  28. volatile <fields>;
  29. }
  30. # Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater
  31. -keepclassmembers class kotlin.coroutines.SafeContinuation {
  32. volatile <fields>;
  33. }
  34. # These classes are only required by kotlinx.coroutines.debug.AgentPremain, which is only loaded when
  35. # kotlinx-coroutines-core is used as a Java agent, so these are not needed in contexts where ProGuard is used.
  36. -dontwarn java.lang.instrument.ClassFileTransformer
  37. -dontwarn sun.misc.SignalHandler
  38. -dontwarn java.lang.instrument.Instrumentation
  39. -dontwarn sun.misc.Signal
  40. # Only used in `kotlinx.coroutines.internal.ExceptionsConstructor`.
  41. # The case when it is not available is hidden in a `try`-`catch`, as well as a check for Android.
  42. -dontwarn java.lang.ClassValue
  43. # An annotation used for build tooling, won't be directly accessed.
  44. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  45. # JSR 305 annotations are for embedding nullability information.
  46. -dontwarn javax.annotation.**
  47. # A resource is loaded with a relative path so the package of this class must be preserved.
  48. -adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
  49. # Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
  50. -dontwarn org.codehaus.mojo.animal_sniffer.*
  51. # OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
  52. -dontwarn okhttp3.internal.platform.**
  53. -dontwarn org.conscrypt.**
  54. -dontwarn org.bouncycastle.**
  55. -dontwarn org.openjsse.**
  56. -keep class com.tencent.** { *; }