Quellcode durchsuchen

[new]新增android端混淆文件

zk vor 1 Jahr
Ursprung
Commit
5ecda0ee83
2 geänderte Dateien mit 118 neuen und 0 gelöschten Zeilen
  1. 2 0
      android/app/build.gradle
  2. 116 0
      android/app/proguard-rules.pro

+ 2 - 0
android/app/build.gradle

@@ -84,6 +84,8 @@ android {
         release {
             // TODO: Add your own signing config for the release build.
             // Signing with the debug keys for now, so `flutter run --release` works.
+            minifyEnabled true
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
             signingConfig signingConfigs.ting
         }
     }

+ 116 - 0
android/app/proguard-rules.pro

@@ -0,0 +1,116 @@
+# 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
+-dontshrink
+
+## Log
+-assumenosideeffects class android.util.Log {
+    public static *** d(...);
+    public static *** v(...);
+    public static *** w(...);
+    public static *** i(...);
+    public static *** wtf(...);
+}
+-assumenosideeffects class com.atmob.common.logging.AtmobLog {
+    public static *** d(...);
+    public static *** v(...);
+    public static *** w(...);
+    public static *** i(...);
+    public static *** wtf(...);
+}
+
+## native
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+## res
+-keepclassmembers class **.R$* {
+    public static <fields>;
+}
+
+## ViewBinding & DataBinding
+-keep class * implements androidx.viewbinding.ViewBinding {
+    public inflate(android.view.LayoutInflater);
+    public inflate(android.view.LayoutInflater, android.view.ViewGroup, boolean);
+}
+
+# common config end
+
+# RxJava start
+-dontwarn java.util.concurrent.Flow*
+# RxJava end
+
+# Glide start
+-keep public class * implements com.bumptech.glide.module.GlideModule
+-keep class * extends com.bumptech.glide.module.AppGlideModule {
+ <init>(...);
+}
+-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
+  **[] $VALUES;
+  public *;
+}
+-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
+  *** rewind();
+}
+# Glide end
+
+# Turbo start
+-keep class com.plutus.common.turbo.beans.** {*;}
+# Turbo end
+
+# bugly start
+-dontwarn com.tencent.bugly.**
+-keep public class com.tencent.bugly.**{*;}
+# bugly end
+
+# Umeng start
+-keep class com.umeng.** {*;}
+-keep class org.repackage.** {*;}
+-keepclassmembers class * {
+   public <init> (org.json.JSONObject);
+}
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+# Umeng end
+
+#oaid miitmdid start
+-keep class com.bun.miitmdid.core.** {*;}
+-keep class com.bun.lib.**{*;}
+-keep class XI.CA.XI.**{*;}
+-keep class XI.K0.XI.**{*;}
+-keep class XI.XI.K0.**{*;}
+-keep class XI.vs.K0.**{*;}
+-keep class XI.xo.XI.XI.**{*;}
+-keep class com.asus.msa.SupplementaryDID.**{*;}
+-keep class com.asus.msa.sdid.**{*;}
+-keep class com.bun.lib.**{*;}
+-keep class com.bun.miitmdid.**{*;}
+-keep class com.huawei.hms.ads.identifier.**{*;}
+-keep class com.samsung.android.deviceidservice.**{*;}
+-keep class org.json.**{*;}
+-keep public class com.netease.nis.sdkwrapper.Utils {
+public <methods>;
+}
+#oaid miitmdid end
+