-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
巫圣泰
committed
Dec 24, 2019
1 parent
f55ab9e
commit f4c96fa
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-optimizationpasses 5 | ||
|
||
# 混合时不使用大小写混合,混合后的类名为小写 | ||
-dontusemixedcaseclassnames | ||
|
||
# 指定不去忽略非公共库的类 | ||
-dontskipnonpubliclibraryclasses | ||
|
||
# 这句话能够使我们的项目混淆后产生映射文件 | ||
# 包含有类名->混淆后类名的映射关系 | ||
-verbose | ||
|
||
# 指定不去忽略非公共库的类成员 | ||
-dontskipnonpubliclibraryclassmembers | ||
|
||
# 不做预校验,preverify是proguard的四个步骤之一,Android不需要preverify,去掉这一步能够加快混淆速度。 | ||
-dontpreverify | ||
|
||
# 保留Annotation不混淆 | ||
-keepattributes *Annotation*,InnerClasses | ||
|
||
# 避免混淆泛型 | ||
-keepattributes Signature | ||
|
||
# 抛出异常时保留代码行号 | ||
-keepattributes SourceFile,LineNumberTable | ||
|
||
# 指定混淆是采用的算法,后面的参数是一个过滤器 | ||
# 这个过滤器是谷歌推荐的算法,一般不做更改 | ||
-optimizations !code/simplification/cast,!field/*,!class/merging/* | ||
|
||
|
||
# 保留我们使用的四大组件,自定义的Application等等这些类不被混淆 | ||
# 因为这些子类都有可能被外部调用 | ||
-keep public class * extends android.app.Activity | ||
-keep public class * extends android.app.Appliction | ||
-keep public class * extends android.app.Service | ||
-keep public class * extends android.content.BroadcastReceiver | ||
-keep public class * extends android.content.ContentProvider | ||
-keep public class * extends android.app.backup.BackupAgentHelper | ||
-keep public class * extends android.preference.Preference | ||
-keep public class * extends android.view.View | ||
-keep public class com.android.vending.licensing.ILicensingService | ||
|
||
-keep class * extends android.app.Fragment { | ||
public void setUserVisibleHint(boolean); | ||
public void onHiddenChanged(boolean); | ||
public void onResume(); | ||
public void onPause(); | ||
} | ||
-keep class android.support.v4.app.Fragment { | ||
public void setUserVisibleHint(boolean); | ||
public void onHiddenChanged(boolean); | ||
public void onResume(); | ||
public void onPause(); | ||
} | ||
-keep class * extends android.support.v4.app.Fragment { | ||
public void setUserVisibleHint(boolean); | ||
public void onHiddenChanged(boolean); | ||
public void onResume(); | ||
public void onPause(); | ||
} | ||
|
||
##---------------Begin: proguard configuration for Gson ---------- | ||
# Gson uses generic type information stored in a class file when working with fields. Proguard | ||
# removes such information by default, so configure it to keep all of it. | ||
-keepattributes Signature | ||
|
||
# For using GSON @Expose annotation | ||
-keepattributes *Annotation* | ||
|
||
-keep class io.flutter.app.** { *; } | ||
-keep class io.flutter.plugin.** { *; } | ||
-keep class io.flutter.util.** { *; } | ||
-keep class io.flutter.view.** { *; } | ||
-keep class io.flutter.** { *; } | ||
-keep class io.flutter.plugins.** { *; } | ||
|
||
|
||
-dontwarn android.arch.** | ||
-dontwarn io.flutter.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters