BasePopup icon indicating copy to clipboard operation
BasePopup copied to clipboard

文件名混淆不了

Open Jiang00 opened this issue 2 years ago • 1 comments

继承BasePopupWindow的类使用proguard 混淆不了

Jiang00 avatar Apr 29 '22 07:04 Jiang00

看看proguard规则

razerdp avatar Jul 21 '22 02:07 razerdp

#-dontshrink -optimizationpasses 5 -dontusemixedcaseclassnames #-overloadaggressively #-useuniqueclassmembernames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -allowaccessmodification -dontoptimize -dontpreverify -ignorewarnings -optimizations !code/simplification/arithmetic,!field/,!class/merging/ #-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/,!class/merging/ -keepattributes Annotation -keepattributes Signature -keepattributes Exceptions -renamesourcefileattribute SourceFile -keepattributes SourceFile,LineNumberTable #自定义输出到指定包名 捉迷藏 -verbose

#自定义字典 类名的混淆字典注释 为什么上面说了 #-obfuscationdictionary dict.txt #-classobfuscationdictionary dict.txt #-packageobfuscationdictionary dict.txt

#关闭警告 -dontwarn android.support.** -dontwarn androidx.** #webview 使用了要加上 -keepclassmembers class fqcn.of.javascript.interface.for.webview { public *; }

-keepclassmembers,allowoptimization enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keepclassmembers class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator CREATOR; }

-keepclassmembers class * implements java.io.Serializable { static final long serialVersionUID; private static final java.io.ObjectStreamField[] serialPersistentFields; !static !transient ; !private ; !private ; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); }

#EventBus -keepattributes Annotation -keepclassmembers class ** { @org.greenrobot.eventbus.Subscribe ; } -keep enum org.greenrobot.eventbus.ThreadMode { *; }

Only required if you use AsyncExecutor

-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { (java.lang.Throwable); } #BasePop #-dontwarn razerdp.basepopup.** #-keep class razerdp.basepopup.**{*;}

#Adapter -keep class com.chad.library.adapter.** { *; } -keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter -keep public class * extends com.chad.library.adapter.base.BaseViewHolder -keepclassmembers class $ extends com.chad.library.adapter.base.BaseViewHolder { (...); }

-keep public class * extends com.chad.library.adapter.base.viewholder.BaseViewHolder -keepclassmembers class $ extends com.chad.library.adapter.base.viewholder.BaseViewHolder { (...); }

#Glide -keep public class * implements com.bumptech.glide.module.GlideModule -keep class * extends com.bumptech.glide.module.AppGlideModule { (...); } -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; } -keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder { *** rewind(); }

for DexGuard only

#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule #Greendao -keepclassmembers class * extends org.greenrobot.greendao.AbstractDao { public static java.lang.String TABLENAME; } -keep class **$Properties { *; }

If you DO use SQLCipher:

-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }

If you do NOT use SQLCipher:

-dontwarn net.sqlcipher.database.**

If you do NOT use RxJava:

-dontwarn rx.**

Retrofit

Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and

EnclosingMethod is required to use InnerClasses.

-keepattributes Signature, InnerClasses, EnclosingMethod

Retrofit does reflection on method and parameter annotations.

-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations

Retain service method parameters when optimizing.

-keepclassmembers,allowshrinking,allowobfuscation interface * { @retrofit2.http.* ; }

Ignore annotation used for build tooling.

-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

Ignore JSR 305 annotations for embedding nullability information.

-dontwarn javax.annotation.**

Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.

-dontwarn kotlin.Unit

Top-level functions that can only be used by Kotlin.

-dontwarn retrofit2.KotlinExtensions -dontwarn retrofit2.KotlinExtensions$*

With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy

and replaces all potential values with null. Explicitly keeping the interfaces prevents this.

-if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface <1>

-dontnote retrofit2.Platform -dontnote retrofit2.Platform$IOS$MainThreadExecutor -dontwarn retrofit2.Platform$Java8 -keepattributes Signature -keepattributes Exceptions

okhttp

-dontwarn com.squareup.okhttp.** -keep class com.squareup.okhttp.{*;} -dontwarn com.squareup.okhttp3.** -keep class com.squareup.okhttp3.** { ;} -dontwarn okio.*

JSR 305 annotations are for embedding nullability information.

-dontwarn javax.annotation.**

A resource is loaded with a relative path so the package of this class must be preserved.

-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.

-dontwarn org.codehaus.mojo.animal_sniffer.*

OkHttp platform used only on JVM and when Conscrypt dependency is available.

-dontwarn okhttp3.internal.platform.ConscryptPlatform -keep class org.bouncycastle.** { *; }

#Rxjava -dontwarn sun.misc.** -keepclassmembers class rx.internal.util.unsafe.ArrayQueueField* { long producerIndex; long consumerIndex; } -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { rx.internal.util.atomic.LinkedQueueNode producerNode; } -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef { rx.internal.util.atomic.LinkedQueueNode consumerNode; } -dontnote rx.internal.util.PlatformDependent -dontwarn org.reactivestreams.FlowAdapters -dontwarn org.reactivestreams.** -dontwarn java.util.concurrent.flow.** -dontwarn java.util.concurrent.** -dontwarn java.util.concurrent.Flow*

#okdownload -keepnames class com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection -keep class com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite { public com.liulishuo.okdownload.core.breakpoint.DownloadStore createRemitSelf(); public com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite(android.content.Context); } -keep class com.liulishuo.okdownload.**{*;} -dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings

okhttp https://github.com/square/okhttp/#proguard

-dontwarn okhttp3.** -dontwarn okio.** -dontwarn javax.annotation.** -dontwarn org.conscrypt.**

A resource is loaded with a relative path so the package of this class must be preserved.

-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

#----------- gson ---------------- -keep class com.google.gson.** {;} -keep class com.google.**{;} -keep class sun.misc.Unsafe { ; } -keep class com.google.gson.stream.* { ; } -keep class com.google.gson.examples.android.model.* { ; } -keep class com.qiancheng.carsmangersystem.**{;}

#bar -keep class com.gyf.immersionbar.* {*;} -dontwarn com.gyf.immersionbar.**

#webp -keep public class com.bumptech.glide.integration.webp.WebpImage { *; } -keep public class com.bumptech.glide.integration.webp.WebpFrame { *; } -keep public class com.bumptech.glide.integration.webp.WebpBitmapFactory { *; }

js-evaluator-for-android

-keepattributes JavascriptInterface -keepclassmembers class * { @android.webkit.JavascriptInterface ; } #tab -dontwarn net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ClipPagerTitleView #友盟 -keep class com.umeng.** {*;} -keepclassmembers class * { public (org.json.JSONObject); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); }

#PictureSelector 2.0 -keep class com.luck.picture.lib.** { *; }

#Ucrop -dontwarn com.yalantis.ucrop** -keep class com.yalantis.ucrop** { ; } -keep interface com.yalantis.ucrop* { *; }

#Okio -dontwarn org.codehaus.mojo.animal_sniffer.* #aria download -dontwarn com.arialyy.aria.** -keep class com.arialyy.aria.**{*;} -keep class **$$DownloadListenerProxy{ *; } -keep class **$$UploadListenerProxy{ *; } -keep class **$$DownloadGroupListenerProxy{ *; } -keep class $$DGSubListenerProxy{ ; } -keepclasseswithmembernames class * { @Download. ; @Upload. ; @DownloadGroup. ; }

Jiang00 avatar Sep 29 '22 07:09 Jiang00