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

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.*{*;}