Estevan Fick
08/09/2024, 2:15 PMapplicationVariants.configureEach { variant ->
if (variant.buildType.name == "release") {
tasks.named("lintVital${variant.name.capitalize()}") {Vampire
08/09/2024, 2:33 PMtasks.named { it == "lintVital${variant.name.capitalize()}" }.configureEach {Estevan Fick
08/09/2024, 2:56 PMVampire
08/09/2024, 2:58 PMnamed(...) is an old eager method that requires that the task is already registered at the point in time where you call the method.
named { ... } is a new lazy method that will match all tasks that fulfill the condition whether already registered or registered in the future with .configureEach called on it still behaving lazy and according to taks-configuration avoidance, only configuring the tasks that are configured anyway.Estevan Fick
08/09/2024, 4:15 PM