feat: android混淆支持R8
This commit is contained in:
parent
105f029470
commit
887492ea58
@ -26,27 +26,27 @@ apply plugin: 'com.android.application'
|
|||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'android-junk-code'
|
//apply plugin: 'android-junk-code'
|
||||||
apply plugin: 'com.huawei.agconnect'
|
apply plugin: 'com.huawei.agconnect'
|
||||||
apply from: 'and_res_guard.gradle'
|
apply from: 'and_res_guard.gradle'
|
||||||
|
|
||||||
androidJunkCode {
|
//androidJunkCode {
|
||||||
variantConfig {
|
// variantConfig {
|
||||||
release {
|
// release {
|
||||||
//注意:这里的release是变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
|
// //注意:这里的release是变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
|
||||||
packageBase = "cn.hx.plugin.ui" //生成java类根包名
|
// packageBase = "cn.hx.plugin.ui" //生成java类根包名
|
||||||
packageCount = 30 //生成包数量
|
// packageCount = 30 //生成包数量
|
||||||
activityCountPerPackage = 3 //每个包下生成Activity类数量
|
// activityCountPerPackage = 3 //每个包下生成Activity类数量
|
||||||
excludeActivityJavaFile = false
|
// excludeActivityJavaFile = false
|
||||||
//是否排除生成Activity的Java文件,默认false(layout和写入AndroidManifest.xml还会执行),主要用于处理类似神策全埋点编译过慢问题
|
// //是否排除生成Activity的Java文件,默认false(layout和写入AndroidManifest.xml还会执行),主要用于处理类似神策全埋点编译过慢问题
|
||||||
otherCountPerPackage = 50 //每个包下生成其它类的数量
|
// otherCountPerPackage = 50 //每个包下生成其它类的数量
|
||||||
methodCountPerClass = 20 //每个类下生成方法数量
|
// methodCountPerClass = 20 //每个类下生成方法数量
|
||||||
resPrefix = "junk_" //生成的layout、drawable、string等资源名前缀
|
// resPrefix = "junk_" //生成的layout、drawable、string等资源名前缀
|
||||||
drawableCount = 300 //生成drawable资源数量
|
// drawableCount = 300 //生成drawable资源数量
|
||||||
stringCount = 300 //生成string数量
|
// stringCount = 300 //生成string数量
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@ -178,21 +178,18 @@ android {
|
|||||||
//以下均为鑫泓佳的配置
|
//以下均为鑫泓佳的配置
|
||||||
XIAOMI_APPID : "MI-2882303761520314939",
|
XIAOMI_APPID : "MI-2882303761520314939",
|
||||||
XIAOMI_APPKEY : "MI-5312031456939",
|
XIAOMI_APPKEY : "MI-5312031456939",
|
||||||
<<<<<<< Updated upstream
|
|
||||||
OPPO_APPKEY : "OP-47f668c9943248118502aa58d066393b",
|
OPPO_APPKEY : "OP-47f668c9943248118502aa58d066393b",
|
||||||
OPPO_APPID : "OP-31726001",
|
OPPO_APPID : "OP-31726001",
|
||||||
OPPO_APPSECRET : "OP-05723986bba64183a71530b496922450",
|
OPPO_APPSECRET : "OP-05723986bba64183a71530b496922450",
|
||||||
// VIVO_APPKEY : "vivo的APPKEY",
|
// VIVO_APPKEY : "vivo的APPKEY",
|
||||||
// VIVO_APPID : "vivo的APPID",
|
// VIVO_APPID : "vivo的APPID",
|
||||||
HONOR_APPID : "110798531",
|
HONOR_APPID : "110798531",
|
||||||
=======
|
|
||||||
OPPO_APPKEY : "OP-47f668c9943248118502aa58d066393b",
|
OPPO_APPKEY : "OP-47f668c9943248118502aa58d066393b",
|
||||||
OPPO_APPID : "OP-31726001",
|
OPPO_APPID : "OP-31726001",
|
||||||
OPPO_APPSECRET: "OP-05723986bba64183a71530b496922450",
|
OPPO_APPSECRET: "OP-05723986bba64183a71530b496922450",
|
||||||
VIVO_APPKEY : "75fe8e570425b714e08d0390b14797cb",
|
VIVO_APPKEY : "75fe8e570425b714e08d0390b14797cb",
|
||||||
VIVO_APPID : "105752244",
|
VIVO_APPID : "105752244",
|
||||||
HONOR_APPID : "104458196",
|
HONOR_APPID : "104458196",
|
||||||
>>>>>>> Stashed changes
|
|
||||||
]
|
]
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
@ -261,14 +258,10 @@ dependencies {
|
|||||||
implementation 'com.google.code.gson:gson:2.6.2'
|
implementation 'com.google.code.gson:gson:2.6.2'
|
||||||
implementation 'commons-codec:commons-codec:1.6'
|
implementation 'commons-codec:commons-codec:1.6'
|
||||||
implementation 'androidx.annotation:annotation:1.1.0'
|
implementation 'androidx.annotation:annotation:1.1.0'
|
||||||
<<<<<<< Updated upstream
|
|
||||||
|
|
||||||
=======
|
|
||||||
// 接入荣耀厂商
|
// 接入荣耀厂商
|
||||||
implementation 'cn.jiguang.sdk.plugin:honor:5.2.3'
|
implementation 'cn.jiguang.sdk.plugin:honor:5.2.3'
|
||||||
//需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
//需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
||||||
// implementation(name: 'HiPushSDK-7.0.61.303', ext: 'aar')
|
// implementation(name: 'HiPushSDK-7.0.61.303', ext: 'aar')
|
||||||
//接入 VIVO 厂商
|
//接入 VIVO 厂商
|
||||||
implementation 'cn.jiguang.sdk.plugin:vivo:5.2.3'
|
implementation 'cn.jiguang.sdk.plugin:vivo:5.2.3'
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,21 +94,22 @@
|
|||||||
-keep class com.google.gson.** {*;}
|
-keep class com.google.gson.** {*;}
|
||||||
-keep class com.google.protobuf.** {*;}
|
-keep class com.google.protobuf.** {*;}
|
||||||
|
|
||||||
-keep class com.amap.api.maps.**{*;}
|
-keep class com.amap.api.maps.** { *; }
|
||||||
-keep class com.autonavi.**{*;}
|
-keep class com.autonavi.** { *; }
|
||||||
-keep class com.amap.api.trace.**{*;}
|
-keep class com.amap.api.trace.** {*; }
|
||||||
|
|
||||||
-keep class com.amap.api.location.**{*;}
|
-keep class com.amap.api.location.** {*; }
|
||||||
-keep class com.amap.api.fence.**{*;}
|
-keep class com.amap.api.fence.** { *; }
|
||||||
-keep class com.loc.**{*;}
|
-keep class com.loc.** { *; }
|
||||||
-keep class com.autonavi.aps.amapapi.model.**{*;}
|
-keep class com.amap.flutter.location.** { *; }
|
||||||
|
-keep class com.autonavi.aps.amapapi.model.** { *; }
|
||||||
|
|
||||||
-keep class com.amap.api.services.**{*;}
|
-keep class com.amap.api.services.** { *; }
|
||||||
|
|
||||||
-keep class com.amap.api.maps2d.**{*;}
|
-keep class com.amap.api.maps2d.** { *; }
|
||||||
-keep class com.amap.api.mapcore2d.**{*;}
|
-keep class com.amap.api.mapcore2d.** { *; }
|
||||||
|
|
||||||
-keep class com.amap.api.navi.**{*;}
|
-keep class com.amap.api.navi.** { *; }
|
||||||
|
|
||||||
|
|
||||||
-keep class com.alipay.deviceid.** { *; }
|
-keep class com.alipay.deviceid.** { *; }
|
||||||
@ -21,7 +21,7 @@ buildscript {
|
|||||||
// hms,若不集成华为厂商通道,可直接跳过
|
// hms,若不集成华为厂商通道,可直接跳过
|
||||||
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
||||||
// 垃圾代码生成器
|
// 垃圾代码生成器
|
||||||
classpath "com.github.qq549631030:android-junk-code:1.3.3"
|
// classpath "com.github.qq549631030:android-junk-code:1.3.3"
|
||||||
classpath'com.tencent.mm:AndResGuard-gradle-plugin:1.2.21'
|
classpath'com.tencent.mm:AndResGuard-gradle-plugin:1.2.21'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,8 +48,8 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
super.initState();
|
super.initState();
|
||||||
AMapFlutterLocation.updatePrivacyAgree(true);
|
AMapFlutterLocation.updatePrivacyAgree(true);
|
||||||
AMapFlutterLocation.updatePrivacyShow(true, true);
|
AMapFlutterLocation.updatePrivacyShow(true, true);
|
||||||
requestPermission();
|
|
||||||
AMapFlutterLocation.setApiKey(F.aMapKey.androidKey, F.aMapKey.iosKey);
|
AMapFlutterLocation.setApiKey(F.aMapKey.androidKey, F.aMapKey.iosKey);
|
||||||
|
requestPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future<void> requestPermission() async {
|
// Future<void> requestPermission() async {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user