From 65197aa40fa5d779b204d2b757daa167c978457c Mon Sep 17 00:00:00 2001 From: John Trujillo Date: Fri, 11 Sep 2026 15:20:18 -0500 Subject: [PATCH] fix(proguard): keep libraries plugins share with the app Plugins resolve shared libs parent-first from the app's dex, so R8 strips members only they call -- NoSuchMethodError on FragmentTransaction.replace and Markwon.create in release builds. --- app/proguard-rules.pro | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 343c32d0af..66a85f55c5 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -210,6 +210,18 @@ -keep class kotlin.** { *; } -keep class kotlinx.coroutines.** { *; } +# Same hazard, libraries the app and plugins both ship: the app's shrunk copy +# shadows the plugin's complete one. Union of plugin deps that overlap the app; +# re-audit when a plugin adds one. See docs/research in plugin-examples. +-keep class androidx.fragment.app.** { *; } +-keep class androidx.appcompat.** { *; } +-keep class androidx.core.** { *; } +-keep class androidx.recyclerview.widget.** { *; } +-keep class androidx.constraintlayout.** { *; } +-keep class com.google.android.material.** { *; } +-keep class io.noties.markwon.** { *; } +-keep class com.google.gson.** { *; } + -keep class com.google.firebase.** { *; } -keep class com.google.android.gms.** { *; }