ursus
07/17/2021, 11:11 PMconfigureEach
and register
to achieve config. avoidance
applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
def abi = output.getFilter(com.android.build.OutputFile.ABI)
def abiName = abi.replace("_", "").replace("-", "")
tasks.register("appAutomateUpload${abiName.capitalize()}${variant.name.capitalize()}", AppAutomateUpload) {
group = "browserstack"
...
dependsOn "assemble${variant.name.capitalize()}"
}
}
}
My question is, if only few variants-tasks are actually used, i.e. I for sure don't need all the variant tasks.
Should I
1. just do a if ( variant = "...) then return? to not generate a task for that variant at all
2. or, since this is config avoidance, it doesn't matter, since from what I understand, it will be configured lazily, meaning the unused ones won't get configured ever
Performance is what I'm afterVampire
07/18/2021, 9:19 AM