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

我这样配置发现打包出来的代码怎么没有变化没有加入代码呀 #77

Open
longkehuawei opened this issue Oct 25, 2023 · 1 comment

Comments

@longkehuawei
Copy link

AndroidJunkCode版本: classpath 'com.android.tools.build:gradle:'

gradle版本:7.2

AGP版本:7.1.3

JDK版本:java 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"
    }
}
@HelloJokerWord
Copy link

我看了下也是没有插入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants