We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AndroidJunkCode版本: classpath 'com.android.tools.build:gradle:'
gradle版本:7.2
AGP版本:7.1.3
JDK版本: 11
productFlavors配置:
androidJunkCode配置: androidJunkCode { def config = { packageBase = "com.aitemaadxx.app.ui" packageCount = 30 activityCountPerPackage = 3 excludeActivityJavaFile = false otherCountPerPackage = 50 methodCountPerClass = 20 resPrefix = "junk_" drawableCount = 300 stringCount = 300 } variantConfig { //注意:这里的debug,release为变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease) debug config release config } }
applicationVariants.all { variant ->
variant.outputs.all { output -> def newName newName = "${output.baseName}-V${versionName}" + "-" + buildCode+".apk" outputFileName = new File(newName) println "outputPath:" + variant.getPackageApplication().outputDirectory } variant.assemble.doLast { println "outputPath:" + variant.getPackageApplication().outputDirectory + "/output.json" delete "${variant.getPackageApplication().outputDirectory}/output.json" }
}
The text was updated successfully, but these errors were encountered:
多渠道包如何弄配置了这种,//多渠道配置 productFlavors { aitemaad { applicationId "com.aitemaadxx.money" versionName "1.0.3" versionCode 4 } dinerosa {//主包app applicationId "com.dineroswaxxx.cash" versionName "1.2.2" versionCode 14 buildConfigField "String", "channel", ""10000""
Sorry, something went wrong.
variantConfig { //注意:这里的debug,release为变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease) debug config release config }
上面的注意里不是说的很清楚吗 debug release 要换成你的 aitemaadRelease、dinerosaRelease这样的variant name
这样是可以插入垃圾代码,遇到一个问题aab包崩溃,单独打出来的apk包不会
No branches or pull requests
AndroidJunkCode版本: classpath 'com.android.tools.build:gradle:'
gradle版本:7.2
AGP版本:7.1.3
JDK版本: 11
productFlavors配置:
androidJunkCode配置:
androidJunkCode {
def config = {
packageBase = "com.aitemaadxx.app.ui"
packageCount = 30
activityCountPerPackage = 3
excludeActivityJavaFile = false
otherCountPerPackage = 50
methodCountPerClass = 20
resPrefix = "junk_"
drawableCount = 300
stringCount = 300
}
variantConfig {
//注意:这里的debug,release为变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
debug config
release config
}
}
applicationVariants.all { variant ->
}
The text was updated successfully, but these errors were encountered: