سلام
دوستان این یکی دو شب من اینو ردیف کردم ... روی دو سه تا از پروژه های قبلی هم پیاده کردم ! خطا یا ایراد خاصی رخ نداد!
و تا حدودی (تقریبا متوسط) سورس رو به هم ریخته و نامفهوم کرده!
دوستان اگه راهنمایی خاص، نمونه ای که استفاده میکنن یا هر توصیه دیگه ای واسه افزایش امنیت دارن در ادامه توضیح بدن ...
نکته مهم اینه که از هر کتابخونه ای استفاده کریدن با توجه به توضیحات سازنده اون کتابخونه توی دستورات پروگارد رو روی کتابخونه مورد نظر اعمال کنید (بیشتر کتابخونه های درست و حسابی خودشون دستورات پروگارد رو ارائه میدن)
# 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 *;#}
# General Options-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-verbose
# no optimize apk#-dontoptimize#-dontpreverify
# Optimization-optimizations !code/simplification/variable,!code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*-optimizationpasses 5-allowaccessmodification
# keep activity and fragment from obfuscate
-keep public class * extends android.app.Activity-keep public class * extends android.app.Fragment-keep public class * extends android.support.v4.app.Fragment-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 com.android.vending.licensing.ILicensingService
-dontwarn android.support.design.**-keep class android.support.design.** { *; }-keep interface android.support.design.** { *; }-keep public class android.support.design.R$* { *; }
-keep public class android.support.v7.widget.** { *; }-keep public class android.support.v7.internal.widget.** { *; }-keep public class android.support.v7.internal.view.menu.** { *; }
-keep public class * extends android.support.v4.view.ActionProvider { public <init>(android.content.Context);}
# cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard-keep class android.support.v7.widget.RoundRectDrawable { *; }
-keepattributes *Annotation*-keep public class com.google.vending.licensing.ILicensingService-keep public class com.android.vending.licensing.ILicensingService
-keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); }
-keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet);}
-keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int);}
-keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *;}
# 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
# Removing logging code-assumenosideeffects class android.util.Log { public static boolean isLoggable(java.lang.String, int); public static int v(...); public static int i(...); public static int w(...); public static int d(...); public static int e(...);}
-dontwarn java.nio.file.Files-dontwarn java.nio.file.Path-dontwarn java.nio.file.OpenOption
# keep sqlite class and helper-keep class org.sqlite.** { *; }-keep class org.sqlite.database.** { *; }
# keep libs-keep class com.itextpdf.** { *; }-dontwarn com.itextpdf.**
-keep class com.github.mikephil.charting.** { *; }
در مورد دستورات هم سوالی داشتین همیجا بپرسین، اگه تونستیم و سخت نبود جواب میدیم