增加垃圾生成插件(oppo渠道使用)
This commit is contained in:
@@ -6,6 +6,8 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.huawei.agconnect'
|
||||
apply plugin: 'android-junk-code'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
@@ -190,6 +192,10 @@ android {
|
||||
dimension 'default'
|
||||
}
|
||||
|
||||
oppo {
|
||||
dimension 'default'
|
||||
}
|
||||
|
||||
}
|
||||
buildToolsVersion = '28.0.3'
|
||||
|
||||
@@ -297,3 +303,23 @@ repositories {
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
print("variant.name=" + variant.name)
|
||||
switch (variant.name) {//变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
|
||||
case "oppoRelease":
|
||||
androidJunkCode.configMap.put(variant.name, {
|
||||
packageBase = "com.mango.plugin.ui" //生成java类根包名
|
||||
packageCount = 30 //生成包数量
|
||||
activityCountPerPackage = 30 //每个包下生成Activity类数量
|
||||
excludeActivityJavaFile = false
|
||||
//是否排除生成Activity的Java文件,默认false(layout和写入AndroidManifest.xml还会执行),主要用于处理类似神策全埋点编译过慢问题
|
||||
otherCountPerPackage = 50 //每个包下生成其它类的数量
|
||||
methodCountPerClass = 20 //每个类下生成方法数量
|
||||
resPrefix = "mango_" //生成的layout、drawable、string等资源名前缀
|
||||
drawableCount = 300 //生成drawable资源数量
|
||||
stringCount = 300 //生成string数量
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
|
1
app/proguard-rules.pro
vendored
1
app/proguard-rules.pro
vendored
@@ -440,4 +440,5 @@
|
||||
|
||||
|
||||
-keep class com.zego.**{*;}
|
||||
-keep class com.mango.plugin.**{*;}
|
||||
|
||||
|
@@ -26,6 +26,7 @@ buildscript {
|
||||
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.16'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.huawei.agconnect:agcp:1.3.1.300'
|
||||
classpath "com.github.qq549631030:android-junk-code:1.0.7"
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -57,6 +57,10 @@ android {
|
||||
accompany {
|
||||
dimension 'default'
|
||||
}
|
||||
|
||||
oppo {
|
||||
dimension 'default'
|
||||
}
|
||||
}
|
||||
buildToolsVersion = '28.0.3'
|
||||
|
||||
|
@@ -20,5 +20,5 @@ with_jenkins=false
|
||||
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
|
||||
ndk_abi_filters=arm
|
||||
|
||||
version_name=5.1.1
|
||||
version_code=511
|
||||
version_name=3.3.0
|
||||
version_code=330
|
Reference in New Issue
Block a user