# ============================================================
# easyPhotos 库模块 consumer-rules.pro（传递给 App）
# 库实际包名：com.huantansheng.easyphotos（namespace）
# 要求：完全不混淆，包括其依赖的第三方库
# ============================================================

# 保留整个库包
-keep class com.huantansheng.easyphotos.** { *; }
-keepclassmembers class com.huantansheng.easyphotos.** {
    public <init>(...);
    <fields>;
    <methods>;
}
# 依赖的子采样缩放图片 View
-keep class com.davemorrissey.labs.subscaleview.** { *; }
-keepclassmembers class com.davemorrissey.labs.subscaleview.** {
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    <fields>;
    <methods>;
}
# 依赖的 PhotoView
-keep class com.github.chrisbanes.photoview.** { *; }
-keepclassmembers class com.github.chrisbanes.photoview.** {
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    <fields>;
    <methods>;
}
# 通用自定义 View 构造保留（XML LayoutInflater 反射调用）
-keepclassmembers class * extends android.view.View {
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    public <init>(android.content.Context, android.util.AttributeSet, int, int);
}
-keepclassmembers class * extends android.view.ViewGroup {
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    public <init>(android.content.Context, android.util.AttributeSet, int, int);
}
# 保留注解、泛型、签名
-keepattributes Signature,*Annotation*,InnerClasses,EnclosingMethod,RuntimeVisibleAnnotations
-dontwarn com.huantansheng.easyphotos.**
-dontwarn com.davemorrissey.labs.subscaleview.**
-dontwarn com.github.chrisbanes.photoview.**
