Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚙️ Android: Support APG8 and Add consumer-rules.pro. #177

Open
wants to merge 3 commits into
base: dev-2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'com.jiguang.jverify'
}

compileSdkVersion 28

defaultConfig {
Expand All @@ -35,6 +40,17 @@ android {
disable 'InvalidPackage'
}

buildTypes {
release {
minifyEnabled true
// library 混淆 -> 随 library 引用,自动添加到 apk 打包混淆
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'consumer-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'consumer-rules.pro'
}
}
}

dependencies {
Expand Down
18 changes: 9 additions & 9 deletions android/consumer-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
-dontpreverify

-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-keep class cn.jpush.** {*;}
-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }
-keep class cn.jiguang.** {*;}

-dontwarn cn.com.chinatelecom.**
-keep class cn.com.chinatelecom.** { *; }
-keep class cn.com.chinatelecom.** {*;}
-dontwarn com.ct.**
-keep class com.ct.** { *; }
-keep class com.ct.** {*;}
-dontwarn a.a.**
-keep class a.a.** { *; }
-keep class a.a.** {*;}
-dontwarn com.cmic.**
-keep class com.cmic.** { *; }
-keep class com.cmic.** {*;}
-dontwarn com.unicom.**
-keep class com.unicom.** { *; }
-keep class com.unicom.** {*;}
-dontwarn com.sdk.**
-keep class com.sdk.** { *; }
-keep class com.sdk.** {*;}

-dontwarn com.sdk.**
-keep class com.sdk.** { *; }
-keep class com.sdk.** {*;}