rb90
03/27/2023, 10:55 AMA problem occurred configuring project ':shared'.
> Failed to notify project evaluation listener.
> Cannot add task 'xxx' as a task with that name already exists.
Can you please tell me how to explicitly exclude/disable a task for a dependency?Dirk Hoffmann
03/27/2023, 1:29 PMval myNewTask = tasks.register("myNewTask") { ... }
and if that task already exists (e.g. a plugin created it or a allprojects { ... } / subprojects { } clause in your rootProject, then you can "add" something to the task with
val myNewTask by tasks.existing { ... }
or
tasks {
val myNewTask by existing {
println("evaluating HERE")
doLast {
println("execution HERE")
}
}
}
so no need for disabling ... just use val myNewTask by existing
(or did I misunderstand where your "dependencies" come from which do define/`register` task 'xxx' ??)rb90
03/27/2023, 2:18 PMephemient
03/27/2023, 2:24 PM