# R8 rules for the ThreadCount Staff shell. # # Capacitor's own AAR already contributes consumerProguardFiles that keep anything extending # com.getcapacitor.Plugin and the @CapacitorPlugin / @PluginMethod members. These rules cover the # things that sit outside that net — everything the bridge, the WebView or the manifest reaches by # name rather than by a reference R8 can see. # # This app carries no plugins at all: scripts/build-staff-aab.sh strips the barcode scanner and # haptics out of the generated gradle files and empties assets/capacitor.plugins.json after every # sync, so there is nothing here to keep for them. Rules naming those packages were inherited from # the counter app's copy and matched nothing. # The bridge, its WebView plumbing, and the annotations that drive plugin dispatch. -keep class com.getcapacitor.** { *; } -keep interface com.getcapacitor.** { *; } -keep @interface com.getcapacitor.** { *; } # Anything the WebView calls from JavaScript. proguard-android.txt carries this rule too; it is # repeated here because losing it silently breaks every call from the page into the app. -keepclassmembers class * { @android.webkit.JavascriptInterface ; } # The activity is named in AndroidManifest.xml, and it subclasses BridgeWebViewClient to keep the # back button honest and to follow an approval link into the right page. -keep class tech.threadcount.staff.** { *; } # Keep source file and line numbers in stack traces, and tell Play's symbolicator where to look. # Without these a crash report names the class but not the line that threw. -keepattributes SourceFile,LineNumberTable -renamesourcefileattribute SourceFile # Annotations drive both Capacitor's dispatch and AndroidX's lifecycle wiring. -keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod