# R8/ProGuard keep rules for Tane (org.comunes.tane). # # R8 is enabled for release builds (see build.gradle.kts). It shrinks/optimizes # the Java/Kotlin bytecode and can break code reached only via reflection or JNI # — the native plugins below load their Java classes from C, so R8 can't see the # references and would strip/rename them. Keep them explicitly. Start # conservative; trim only after a release smoke test proves a class is unused. # --- Flutter engine & embedding (defensive; usually handled by the plugin) --- -keep class io.flutter.** { *; } -keep class io.flutter.plugins.** { *; } -dontwarn io.flutter.embedding.** # --- On-device OCR: tesseract4android (JNI) --- # libtesseract/libleptonica call back into these Java classes by name. -keep class com.googlecode.tesseract.android.** { *; } -keep class com.googlecode.leptonica.android.** { *; } -keep class io.paratoner.flutter_tesseract_ocr.** { *; } # --- QR scanning: zxing_barcode_scanner (pure ZXing, platform view) --- -keep class com.shirisharyal.zxing_barcode_scanner.** { *; } # --- Encrypted DB: SQLCipher / sqlite3 native loader --- # sqlite3 is reached over FFI (dlopen), but keep the loader plugin classes. -keep class eu.simonbinder.sqlite3_flutter_libs.** { *; } -keep class net.zetetic.** { *; } -dontwarn net.zetetic.** # --- Local notifications --- # Published keep rules for flutter_local_notifications' Gson-serialized models. -keep class com.dexterous.** { *; } -keep class com.google.gson.** { *; } -keep class * extends com.google.gson.TypeAdapter -keepattributes Signature -keepattributes *Annotation* -dontwarn com.google.errorprone.annotations.** # --- Core library desugaring --- -dontwarn java.lang.invoke.** -dontwarn build.IgnoreJava8API