# Prevent WebViewClientCompat from being renamed, since chromium depends on this name.
-keepnames public class androidx.webkit.WebViewClientCompat

# Public SDK API.
-keep class app.screeb.sdk.Screeb {
    public *;
}
-keep class app.screeb.sdk.InitOptions {
    public *;
}
-keep class app.screeb.sdk.init.model.Identity {
    public *;
}
-keep class app.screeb.sdk.ScreebViewKt {
    public *;
}

# Manifest entry points.
-keep class app.screeb.sdk.ScreebInitProvider
-keep class app.screeb.sdk.ScreebFilePickerActivity

# Keep only the JS bridge entrypoints. Do not keep the whole WebView implementation.
-keepclassmembers class * {
    @android.webkit.JavascriptInterface <methods>;
}

# Keep Play Core library (for in-app reviews)
-keep class com.google.android.play.core.** { *; }

# === Session Replay — reflection targets ===
# Flutter (a11y bridge + setSemanticsEnabled reflection)
-keepnames class io.flutter.embedding.android.FlutterView { *; }
-keepnames class io.flutter.embedding.android.FlutterSurfaceView { *; }
-keepnames class io.flutter.embedding.android.FlutterTextureView { *; }
-keepnames class io.flutter.view.FlutterView { *; }

# Jetpack Compose (SemanticsOwner reflection)
-keepnames class androidx.compose.ui.platform.AndroidComposeView { *; }
-keepnames class androidx.compose.ui.semantics.SemanticsOwner { *; }

# WindowManagerGlobal (multi-window enumeration via reflection)
-keepclassmembers class android.view.WindowManagerGlobal { *; }

# RecyclerView stable-id / position tracking via reflection. Without this the host's
# R8 may rename these and the SDK silently loses RecyclerView item identity.
-keepclassmembers class androidx.recyclerview.widget.RecyclerView {
    public int getChildAdapterPosition(android.view.View);
    public *** getAdapter();
}
-keepclassmembers class * extends androidx.recyclerview.widget.RecyclerView$Adapter {
    public boolean hasStableIds();
    public long getItemId(int);
}
