Download Latest Version 2.0.3 source code.zip (360.2 kB)
Home / 2.0.1
Name Modified Size InfoDownloads / Week
Parent folder
2.0.1 source code.tar.gz 2026-11-08 332.2 kB
2.0.1 source code.zip 2026-11-08 357.1 kB
README.md 2026-11-08 863 Bytes
Totals: 3 Items   690.1 kB 0

支持variantBuilder.registerExtension方式配置:

:::kotlin
androidComponents {
    beforeVariants { variantBuilder ->
        if (variantBuilder.buildType == "release") {
            variantBuilder.registerExtension(
                JunkCodeConfig::class.java,
                JunkCodeConfig(variantBuilder.name).apply {
                    packageBase = "cn.hx.plugin.ui"
                    packageCount = 30
                    activityCountPerPackage = 30
                    excludeActivityJavaFile = false
                    otherCountPerPackage = 50
                    methodCountPerClass = 20
                    resPrefix = "junk_"
                    drawableCount = 300
                    stringCount = 300
                })
        }
    }
}
Source: README.md, updated 2026-11-08