proguard-rules.pro 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Capacitor core
  2. -keep class com.getcapacitor.** { *; }
  3. -keep @com.getcapacitor.annotation.CapacitorPlugin class * { *; }
  4. -keep @com.getcapacitor.annotation.Permission class * { *; }
  5. -keepclassmembers class * extends com.getcapacitor.Plugin {
  6. @com.getcapacitor.annotation.CapacitorPlugin <methods>;
  7. @com.getcapacitor.PluginMethod <methods>;
  8. }
  9. # JavaScript Interface (WebView <-> Java bridge)
  10. -keepclassmembers class * {
  11. @android.webkit.JavascriptInterface <methods>;
  12. }
  13. # WebView
  14. -keepclassmembers class * extends android.webkit.WebViewClient {
  15. public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
  16. public boolean *(android.webkit.WebView, java.lang.String);
  17. public void *(android.webkit.WebView, java.lang.String);
  18. }
  19. # Firebase
  20. -keep class com.google.firebase.** { *; }
  21. -keep class com.google.android.gms.** { *; }
  22. -dontwarn com.google.firebase.**
  23. -dontwarn com.google.android.gms.**
  24. # Google Maps
  25. -keep class com.google.android.libraries.maps.** { *; }
  26. -dontwarn com.google.android.libraries.maps.**
  27. # OkHttp (Capacitor HTTP plugin)
  28. -dontwarn okhttp3.**
  29. -dontwarn okio.**
  30. -keep class okhttp3.** { *; }
  31. -keep interface okhttp3.** { *; }
  32. # Kotlin
  33. -keep class kotlin.** { *; }
  34. -dontwarn kotlin.**
  35. -keepclassmembers class **$WhenMappings {
  36. <fields>;
  37. }
  38. # Preserve stack traces in crash reports
  39. -keepattributes SourceFile,LineNumberTable
  40. -renamesourcefileattribute SourceFile
  41. # Annotations
  42. -keepattributes *Annotation*
  43. -keepattributes Signature
  44. -keepattributes Exceptions