# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# 设置混淆的压缩比率 0 ~ 7
-optimizationpasses 7
# 混淆时不使用大小写混合，混淆后的类名为小写
-dontusemixedcaseclassnames
# 指定不去忽略非公共库的类
-dontskipnonpubliclibraryclasses
# 指定不去忽略非公共库的成员
-dontskipnonpubliclibraryclassmembers
# 混淆时不做预校验
-dontpreverify
# 混淆时不记录日志
-verbose

# 代码优化
-dontshrink
# 不优化输入的类文件
-dontoptimize
# 保留注解不混淆
-keepattributes *Annotation*,InnerClasses
# 避免混淆泛型
-keepattributes Signature
# 保留代码行号，方便异常信息的追踪
-keepattributes SourceFile,LineNumberTable
# 混淆采用的算法
-optimizations !code/simplification/cast,!field/*,!class/merging/*

# dump.txt文件列出apk包内所有class的内部结构
-dump class_files.txt
# seeds.txt文件列出未混淆的类和成员
-printseeds seeds.txt
# usage.txt文件列出从apk中删除的代码
-printusage unused.txt
# mapping.txt文件列出混淆前后的映射
-printmapping mapping.txt


-keep public class * extends android.view.View{
    *** get*();
    void set*(***);
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
}


# 关于混淆 https://juejin.cn/post/6844903601505042440 .各种情况的保持不混淆

# 既可以保持该包下的类名，又可以保持类里面的内容不被混淆;
-keep public class com.AI.FaceVerify.utils.FaceFileProviderUtils{ *; }

-keep public class com.AI.FaceVerify.verify.ProcessCallBack{ *; }

-keep public class com.AI.FaceVerify.graphic.GraphicOverlay{ *; }

-keep public class com.AI.FaceVerify.verify.VerifyStatus{ *; }


-keep public class com.AI.FaceVerify.verify.VerifyStatus$ALIVE_DETECT_TYPE_ENUM{ *; }
-keep public class com.AI.FaceVerify.verify.VerifyStatus$ALIVE_DETECT_RESULT_ENUM{ *; }

-keep public class com.AI.FaceVerify.verify.FaceDetectorUtils{*;}
-keep public class com.AI.FaceVerify.verify.FaceProcessBuilder$Builder{*;}


# 保持类名和某个方法名，其他方法和变量全部可以混淆
-keep public class com.AI.FaceVerify.utils.AiUtil{
    public static android.graphics.Bitmap compressPath(android.content.Context, android.net.Uri);

}





