|
|
@@ -1,21 +1,52 @@
|
|
|
-# Add project specific ProGuard rules here.
|
|
|
-# You can control the set of applied configuration files using the
|
|
|
-# proguardFiles setting in build.gradle.
|
|
|
-#
|
|
|
-# For more details, see
|
|
|
-# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
-
|
|
|
-# If your project uses WebView with JS, uncomment the following
|
|
|
-# and specify the fully qualified class name to the JavaScript interface
|
|
|
-# class:
|
|
|
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
|
-# public *;
|
|
|
-#}
|
|
|
-
|
|
|
-# Uncomment this to preserve the line number information for
|
|
|
-# debugging stack traces.
|
|
|
-#-keepattributes SourceFile,LineNumberTable
|
|
|
-
|
|
|
-# If you keep the line number information, uncomment this to
|
|
|
-# hide the original source file name.
|
|
|
-#-renamesourcefileattribute SourceFile
|
|
|
+# Capacitor core
|
|
|
+-keep class com.getcapacitor.** { *; }
|
|
|
+-keep @com.getcapacitor.annotation.CapacitorPlugin class * { *; }
|
|
|
+-keep @com.getcapacitor.annotation.Permission class * { *; }
|
|
|
+-keepclassmembers class * extends com.getcapacitor.Plugin {
|
|
|
+ @com.getcapacitor.annotation.CapacitorPlugin <methods>;
|
|
|
+ @com.getcapacitor.PluginMethod <methods>;
|
|
|
+}
|
|
|
+
|
|
|
+# JavaScript Interface (WebView <-> Java bridge)
|
|
|
+-keepclassmembers class * {
|
|
|
+ @android.webkit.JavascriptInterface <methods>;
|
|
|
+}
|
|
|
+
|
|
|
+# WebView
|
|
|
+-keepclassmembers class * extends android.webkit.WebViewClient {
|
|
|
+ public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
|
|
+ public boolean *(android.webkit.WebView, java.lang.String);
|
|
|
+ public void *(android.webkit.WebView, java.lang.String);
|
|
|
+}
|
|
|
+
|
|
|
+# Firebase
|
|
|
+-keep class com.google.firebase.** { *; }
|
|
|
+-keep class com.google.android.gms.** { *; }
|
|
|
+-dontwarn com.google.firebase.**
|
|
|
+-dontwarn com.google.android.gms.**
|
|
|
+
|
|
|
+# Google Maps
|
|
|
+-keep class com.google.android.libraries.maps.** { *; }
|
|
|
+-dontwarn com.google.android.libraries.maps.**
|
|
|
+
|
|
|
+# OkHttp (Capacitor HTTP plugin)
|
|
|
+-dontwarn okhttp3.**
|
|
|
+-dontwarn okio.**
|
|
|
+-keep class okhttp3.** { *; }
|
|
|
+-keep interface okhttp3.** { *; }
|
|
|
+
|
|
|
+# Kotlin
|
|
|
+-keep class kotlin.** { *; }
|
|
|
+-dontwarn kotlin.**
|
|
|
+-keepclassmembers class **$WhenMappings {
|
|
|
+ <fields>;
|
|
|
+}
|
|
|
+
|
|
|
+# Preserve stack traces in crash reports
|
|
|
+-keepattributes SourceFile,LineNumberTable
|
|
|
+-renamesourcefileattribute SourceFile
|
|
|
+
|
|
|
+# Annotations
|
|
|
+-keepattributes *Annotation*
|
|
|
+-keepattributes Signature
|
|
|
+-keepattributes Exceptions
|