Commit 92e5fc2a by Baoxy

fix: 修复bug

1.添加混淆 2.更改弹窗
parent f534cc13
...@@ -55,9 +55,24 @@ android { ...@@ -55,9 +55,24 @@ android {
} }
release { release {
minifyEnabled false zipAlignEnabled true
debuggable false
minifyEnabled true
jniDebuggable false
// 移除无用的资源文件
shrinkResources true
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
if (isWindows()) {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro',
'..\\proguards\\proguard-rules.pro',
'..\\proguards\\proguard_base.pro', '..\\proguards\\proguard_third.pro',
'..\\proguards\\proguard_lib.pro', '..\\proguards\\proguard_lib_hook.pro'
} else {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro',
'../proguards/proguard-rules.pro',
'../proguards/proguard_base.pro', '../proguards/proguard_third.pro',
'../proguards/proguard_lib.pro', '../proguards/proguard_lib_hook.pro'
}
} }
} }
......
...@@ -26,8 +26,8 @@ MAVEN_URL=http://192.168.0.170:13000/nexus/content/repositories/releases/ ...@@ -26,8 +26,8 @@ MAVEN_URL=http://192.168.0.170:13000/nexus/content/repositories/releases/
MAVEN_URL_SNAPSHOT=http://192.168.0.170:13000/nexus/content/repositories/releases/ MAVEN_URL_SNAPSHOT=http://192.168.0.170:13000/nexus/content/repositories/releases/
#32位有符号数2147483647(10) #32位有符号数2147483647(10)
versionIntCode=2020032101 versionIntCode=2020032301
versionNameMajor=1 versionNameMajor=1
versionNameMinor=0 versionNameMinor=0
versionNamePatch=2 versionNamePatch=3
\ No newline at end of file \ No newline at end of file
...@@ -49,14 +49,16 @@ android { ...@@ -49,14 +49,16 @@ android {
release { release {
buildConfigField "boolean", "LOG_DEBUG", "false" buildConfigField "boolean", "LOG_DEBUG", "false"
debuggable false debuggable false
minifyEnabled false minifyEnabled true
zipAlignEnabled true zipAlignEnabled true
if (isWindows()) { if (isWindows()) {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro',
'..\\proguards\\proguard-rules.pro',
'..\\proguards\\proguard_base.pro', '..\\proguards\\proguard_third.pro', '..\\proguards\\proguard_base.pro', '..\\proguards\\proguard_third.pro',
'..\\proguards\\proguard_lib.pro', '..\\proguards\\proguard_lib_hook.pro' '..\\proguards\\proguard_lib.pro', '..\\proguards\\proguard_lib_hook.pro'
} else { } else {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro',
'../proguards/proguard-rules.pro',
'../proguards/proguard_base.pro', '../proguards/proguard_third.pro', '../proguards/proguard_base.pro', '../proguards/proguard_third.pro',
'../proguards/proguard_lib.pro', '../proguards/proguard_lib_hook.pro' '../proguards/proguard_lib.pro', '../proguards/proguard_lib_hook.pro'
} }
......
...@@ -27,11 +27,11 @@ class BuyCodeDialog private constructor(val mContext: Context) : DialogInterface ...@@ -27,11 +27,11 @@ class BuyCodeDialog private constructor(val mContext: Context) : DialogInterface
.create() .create()
val window = mDialog?.window val window = mDialog?.window
window?.setBackgroundDrawableResource(R.drawable.dialog_corner_bg) window?.setBackgroundDrawableResource(R.drawable.dialog_corner_bg)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window?.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY) // window?.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY)
} else { // } else {
window?.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT) // window?.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT)
} // }
} }
if (!mDialog!!.isShowing) { if (!mDialog!!.isShowing) {
try { try {
......
...@@ -2,12 +2,10 @@ package com.secspace.lib.common.update; ...@@ -2,12 +2,10 @@ package com.secspace.lib.common.update;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.text.TextUtils; import android.text.TextUtils;
import com.alibaba.android.arouter.launcher.ARouter;
import com.secspace.lib.common.BuildConfig; import com.secspace.lib.common.BuildConfig;
import com.secspace.lib.common.R; import com.secspace.lib.common.R;
import com.secspace.lib.common.event.OnPushMessageEvent; import com.secspace.lib.common.event.OnPushMessageEvent;
...@@ -30,9 +28,6 @@ import org.greenrobot.eventbus.EventBus; ...@@ -30,9 +28,6 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import static com.secspace.lib.common.env.Intents.Launcher.ACTION_HAS_UPDATE;
import static com.secspace.lib.common.env.Intents.Launcher.ACTION_NO_UPDATE;
/** /**
* Launcher * Launcher
* *
......
-keep,allowshrinking,allowoptimization class com.android.launcher3.** {
*;
}
-keep class com.android.launcher3.allapps.AllAppsBackgroundDrawable {
public void setAlpha(int);
public int getAlpha();
}
-keep class com.android.launcher3.BaseRecyclerViewFastScrollBar {
public void setThumbWidth(int);
public int getThumbWidth();
public void setTrackWidth(int);
public int getTrackWidth();
}
-keep class com.android.launcher3.BaseRecyclerViewFastScrollPopup {
public void setAlpha(float);
public float getAlpha();
}
-keep class com.android.launcher3.ButtonDropTarget {
public int getTextColor();
}
-keep class com.android.launcher3.CellLayout {
public float getBackgroundAlpha();
public void setBackgroundAlpha(float);
}
-keep class com.android.launcher3.CellLayout$LayoutParams {
public void setWidth(int);
public int getWidth();
public void setHeight(int);
public int getHeight();
public void setX(int);
public int getX();
public void setY(int);
public int getY();
}
-keep class com.android.launcher3.dragndrop.DragLayer$LayoutParams {
public void setWidth(int);
public int getWidth();
public void setHeight(int);
public int getHeight();
public void setX(int);
public int getX();
public void setY(int);
public int getY();
}
-keep class com.android.launcher3.FastBitmapDrawable {
public void setDesaturation(float);
public float getDesaturation();
public void setBrightness(float);
public float getBrightness();
}
-keep class com.android.launcher3.MemoryDumpActivity {
*;
}
-keep class com.android.launcher3.PreloadIconDrawable {
public float getAnimationProgress();
public void setAnimationProgress(float);
}
-keep class com.android.launcher3.pageindicators.CaretDrawable {
public float getCaretProgress();
public void setCaretProgress(float);
}
-keep class com.android.launcher3.Workspace {
public float getBackgroundAlpha();
public void setBackgroundAlpha(float);
}
# Proguard will strip new callbacks in LauncherApps.Callback from
# WrappedCallback if compiled against an older SDK. Don't let this happen.
-keep class com.android.launcher3.compat.** {
*;
}
# Proguard will strip methods required for talkback to properly scroll to
# next row when focus is on the last item of last row when using a RecyclerView
# Keep optimized and shrunk proguard to prevent issues like this when using
# support jar.
#-keep,allowoptimization,allowshrinking class android.support.** {
# *;
#}
-keep class android.support.v7.widget.RecyclerView { *; }
-keep interface com.android.launcher3.userevent.nano.LauncherLogProto.** {
*;
}
-keep interface com.android.launcher3.model.nano.LauncherDumpProto.** {
*;
}
#-keep 指定需要保留的类和类成员(作为公共类库,应该保留所有可公开访问的public方法)
#-keepclassmembers 指定需要保留的类成员:变量或者方法
#1.基本指令区
# 指定代码的压缩级别
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
#-ignorewarning
-ignorewarnings
-printmapping proguardMapping.txt
-optimizations !code/simplification/cast,!field/*,!class/merging/*
-keepattributes *Annotation*,InnerClasses
-keep class * implements java.lang.annotation.Annotation {*;}
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-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 android.support.** {*;}
-dontwarn android.support.**
# native
-keepclasseswithmembernames class * {
native <methods>;
}
# enum
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
# view
-keepclassmembers class * extends android.app.Activity{
public void *(android.view.View);
}
-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);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-keep class **.R$* {
*;
}
-keepclassmembers class * {
void *(**On*Event);
}
# webview
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
-keepclassmembers class * extends android.webkit.webViewClient {
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.webViewClient {
public void *(android.webkit.webView, jav.lang.String);
}
# keep注解
-keep class android.support.annotation.Keep
-keep @android.support.annotation.Keep class * {*;}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <methods>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <init>(...);
}
## butterknife
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
# RxJava
-dontwarn rx.**
# okio
-dontwarn okio.**
# Gson
-keep class com.google.gson.** { *; }
-keep class com.google.gson.stream.** { *; }
#OkHttp3
-dontwarn com.squareup.okhttp3.**
-keep class com.squareup.okhttp3.** { *;}
-dontwarn okio.**
# retrofit2
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
# baiduMapApi
-keep class com.baidu.** { *; }
-keep class com.baidu.mapapi.** {*;}
-keep class vi.com.gdi.bgl.android.**{*;}
# xutils
-keep class org.xutils.**{*;}
#log4j
-keep class org.apache.log4j.**{*;}
-keep class de.mindpipe.android.logging.log4j.**{*;}
#org.apache.httpcomponents:httpcore:4.4.1'
-keep class org.apache.http.**{*;}
#websocket
-keep class de.tavendo.autobahn.** {*;}
#EventBus
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode {
*;
}
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
# LeakCanary
-keep class org.eclipse.mat.** { *; }
-keep class com.squareup.leakcanary.** { *; }
# SQLCipher:
-dontwarn net.sqlcipher.**
-keep class net.sqlcipher.** {*;}
#Bugly
-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}
### greenDAO 3
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties
-dontwarn org.greenrobot.greendao.database.**
# 华为push
-keep class com.huawei.hms.** { *; }
# ARouter
-keep public class com.alibaba.android.arouter.routes.**{*;}
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
# xstream
-dontwarn com.thoughtworks.xstream.**
-keep class com.thoughtworks.xstream.** { *; }
# jpush
-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
# http apache
-dontwarn android.net.compatibility.**
-dontwarn android.net.http.**
-dontwarn com.android.internal.http.multipart.**
-dontwarn org.apache.commons.**
-dontwarn org.apache.http.**
-keep class android.net.compatibility.**{*;}
-keep class android.net.http.**{*;}
-keep class com.android.internal.http.multipart.**{*;}
-keep class org.apache.commons.**{*;}
-keep class org.apache.http.**{*;}
# checkupdate
-keep class com.skr.library.checkupdate.beans.** { *; }
## 售后激活
-keep class com.skr.activation.bean.** { *; }
-keep class com.secspace.lib.config.ConfigJsonUtil$ConfigBean { *; }
#以下sophix热修复
#基线包使用,生成mapping.txt
#-printmapping mapping.txt
#应用映射文件保证前后版本混淆一致
#生成的mapping.txt在app/build/outputs/mapping/release路径下,移动到/app路径下
#修复后的项目使用,保证混淆结果一致
#-applymapping mapping.txt
#hotfix
-keep class com.taobao.sophix.**{*;}
-keep class com.ta.utdid2.device.**{*;}
-dontwarn com.alibaba.sdk.android.utils.**
#防止inline
-dontoptimize
-keepclassmembers class com.my.pkg.MyRealApplication {
public <init>();
}
# 如果不使用android.support.annotation.Keep则需加上此行
# -keep class com.my.pkg.SophixStubApplication$RealApplicationStub
#以上sophix热修复
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment