add proguard

This commit is contained in:
unknown
2020-07-17 18:52:02 +08:00
parent 511ef17bd6
commit 966207fd8b
48 changed files with 176 additions and 53 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -39,13 +39,13 @@ android {
}
buildTypes {
debug {
signingConfig signingConfigs.release
debuggable = true
signingConfig signingConfigs.release
}
release {
minifyEnabled false
zipAlignEnabled false
shrinkResources false
minifyEnabled true
zipAlignEnabled true
shrinkResources true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}

View File

@@ -156,6 +156,27 @@
public static *** w(...);
}
#kotlin
-keep class kotlin.* { *; }
-keepclassmembernames class kotlinx.*{
volatile <fields>;
}
-keep class kotlin.Metadata { *; }
-dontwarn kotlin.*
-dontwarn kotlin.**
-keepclassmembers class **$WhenMappings {
<fields>;
}
-keepclassmembers class kotlin.Metadata {
public <methods>;
}
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
}
-keepclassmembers class kotlin.Metadata { *; }
-keep @kotlin.Metadata class *
-keepclasseswithmembers @kotlin.Metadata class * { *; }
#----------------------------------------第三方库----------------------------------------------
#-----高德地图-----
#3D 地图 V5.0.0之后:
@@ -225,6 +246,10 @@
#-----Okio-----
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn com.squareup.**
-dontwarn okio.**
-keep public class org.codehaus.* { *; }
-keep public class java.nio.* { *; }
#-----OkHttp-----
# JSR 305 annotations are for embedding nullability information.
@@ -277,7 +302,7 @@
}
#-----ZhiDaoService-----
-keep class com.zhidao.auto.*{*;}
-keep class com.zhidao.auto.platform.*{*;}
-keep class com.zhidaohulian.*{*;}
-keep class com.elegant.analytics.*{*;}
-keep class com.zhidao.socketsdk.*{*;}

View File

@@ -22,7 +22,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----Foundation-Commons-----
-keep class com.mogo.commons.data.BaseData.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----Foundation-Commons-----
-keep class com.mogo.commons.data.BaseData.*{*;}

View File

@@ -3,7 +3,6 @@ package com.mogo.commons.network;
import com.mogo.commons.data.BaseData;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.RequestOptions;
import com.mogo.utils.network.utils.GsonUtil;
import com.mogo.utils.network.utils.Util;
import io.reactivex.Observer;

View File

@@ -59,9 +59,9 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17
# 探路
MOGO_MODULE_TANLU_VERSION=1.3.0.3-byd
# 车聊聊
CARCHATTING_VERSION=1.3.2
CARCHATTING_VERSION=1.4.1
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.3.2
CARCHATTINGPROVIDER_VERSION=1.3.4
# 视频引导
MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT
# 视频引导接口
@@ -69,7 +69,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
MOGO_MODULE_V2X_VERSION=1.2.8
MOGO_MODULE_V2X_VERSION=1.3.0
# 推送
MOGO_MODULE_PUSH_VERSION=1.1.5.6
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5

View File

@@ -15,7 +15,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----library-MapAMap-----
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----library-MapAMap-----
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}

View File

@@ -15,7 +15,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----library-MapApi----
-keep class com.mogo.map.search.geo.MogoRegeocodeResult.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----library-MapApi----
-keep class com.mogo.map.search.geo.MogoRegeocodeResult.*{*;}

View File

@@ -24,7 +24,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1 @@
#-----AppModule-----

View File

@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'android-aspectjx'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
@@ -29,7 +28,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
@@ -51,7 +52,6 @@ dependencies {
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.aspectj
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoutils

View File

@@ -0,0 +1,2 @@
#-----AuthorizeModule-----
-keep class com.mogo.module.authorize.module.bean.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----AuthorizeModule-----
-keep class com.mogo.module.authorize.module.bean.*{*;}

View File

@@ -1,17 +0,0 @@
package com.mogo.module.authorize.aspectj
import org.aspectj.lang.annotation.Aspect
import org.aspectj.lang.annotation.Pointcut
@Aspect
class VoiceForbiddenWhenAuthorize {
companion object{
const val TAG = "VoiceForbiddenWhenAuthorize"
}
@Pointcut()
fun authorizeTrackPoint(){
}
}

View File

@@ -15,7 +15,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,4 @@
#-----CommonModule-----
-keep class com.mogo.module.common.entity.*
-keep class com.mogo.module.common.entity.*{*;}
-keep class com.mogo.module.common.entity.MarkerResponse.*{*;}

View File

@@ -19,3 +19,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----CommonModule-----
-keep class com.mogo.module.common.entity.*
-keep class com.mogo.module.common.entity.*{*;}
-keep class com.mogo.module.common.entity.MarkerResponse.*{*;}

View File

@@ -25,7 +25,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,3 @@
#-----EventPanel------
-keep class com.zhidao.mogo.module.event.panel.bean.*{*;}
-keep class com.zhidao.mogo.module.event.panel.dao.*{*;}

View File

@@ -18,4 +18,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
#-----EventPanel------
-keep class com.zhidao.mogo.module.event.panel.bean.*{*;}
-keep class com.zhidao.mogo.module.event.panel.dao.*{*;}

View File

@@ -22,7 +22,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----ExtensionModule-----
-keep class com.mogo.module.extensions.userinfo.UserInfoResponse.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----ExtensionModule-----
-keep class com.mogo.module.extensions.userinfo.UserInfoResponse.*{*;}

View File

@@ -21,7 +21,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----GPS-DEBUG-SIMULATOR-----
-keep class com.mogo.module.gps.simulator.CationVo.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----GPS-DEBUG-SIMULATOR-----
-keep class com.mogo.module.gps.simulator.CationVo.*{*;}

View File

@@ -28,7 +28,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -21,7 +21,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----MainModule-----
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----MainModule-----
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}

View File

@@ -22,7 +22,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,10 @@
#-----MediaModule-----
-dontwarn com.mogo.module.media.**
-keep class com.mogo.module.media.listener.* { *; }
-keep class com.mogo.module.media.model.* { *; }
-keep class com.mogo.module.media.view.* { *; }
-keep class com.mogo.module.media.widget.* { *; }
-keep class com.mogo.module.media.api.* { *; }
-keep class com.mogo.module.media.constants.* { *; }
-keep class com.mogo.module.media.presenter.* { *; }
-keep class com.mogo.module.media.receiver.* { *; }

View File

@@ -19,12 +19,14 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----MediaModule-----
-dontwarn com.mogo.module.media.**
-keep class com.mogo.module.media.listener.** { *; }
-keep class com.mogo.module.media.model.** { *; }
-keep class com.mogo.module.media.view.** { *; }
-keep class com.mogo.module.media.widget.** { *; }
-keep class com.mogo.module.media.api.** { *; }
-keep class com.mogo.module.media.constants.** { *; }
-keep class com.mogo.module.media.presenter.** { *; }
-keep class com.mogo.module.media.receiver.** { *; }
-keep class com.mogo.module.media.listener.* { *; }
-keep class com.mogo.module.media.model.* { *; }
-keep class com.mogo.module.media.view.* { *; }
-keep class com.mogo.module.media.widget.* { *; }
-keep class com.mogo.module.media.api.* { *; }
-keep class com.mogo.module.media.constants.* { *; }
-keep class com.mogo.module.media.presenter.* { *; }
-keep class com.mogo.module.media.receiver.* { *; }

View File

@@ -29,7 +29,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,4 @@
#-----SearchModule-----
-keep class com.mogo.module.navi.bean.*{*;}
-keep class com.mogo.module.navi.dao.*{*;}
-keep class com.mogo.module.navi.database.*{*;}

View File

@@ -19,3 +19,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----SearchModule-----
-keep class com.mogo.module.navi.bean.*{*;}
-keep class com.mogo.module.navi.dao.*{*;}
-keep class com.mogo.module.navi.database.*{*;}

View File

@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.android.library'
apply plugin: 'com.alibaba.arouter'
android {
@@ -24,7 +25,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,4 @@
#-----ServiceModule-----
-keep class com.mogo.module.service.carinfo.CarStateInfo.*{*;}
-keep class com.mogo.module.service.network.RefreshBody.*{*;}
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}

View File

@@ -19,3 +19,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----ServiceModule-----
-keep class com.mogo.module.service.carinfo.CarStateInfo.*{*;}
-keep class com.mogo.module.service.network.RefreshBody.*{*;}
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}

View File

@@ -24,7 +24,9 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
zipAlignEnabled true
consumerProguardFiles 'consumer-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

View File

@@ -0,0 +1,2 @@
#-----ShareModule-----
-keep class com.mogo.module.share.bean.*{*;}

View File

@@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-----ShareModule-----
-keep class com.mogo.module.share.bean.*{*;}