Slackbot
02/17/2023, 9:52 PMephemient
02/17/2023, 10:08 PMephemient
02/17/2023, 10:13 PMtasks.getNames() without making it configuredephemient
02/17/2023, 10:14 PMVampire
02/17/2023, 11:26 PMtasks.names and if it is not there use tasks.whenTaskAdded?
But that will effectively disable task configuration avoidance.
You can limit it down to just disabling task configuration avoidance for a specific task type if you know the type by using tasks.withType<...>().whenTaskAdded.ephemient
02/18/2023, 12:35 AMtasks.names.whenAdded or tasks.whenRegistered, so at least publicly you can't watch for additions without forcing realization of added objects. but as a hack using non-public APIs,
tasks.withGroovyBuilder {
"whenElementKnown" {
println(getProperty("name") to getProperty("type"))
}
}
seems to work in Gradle 8.0.1Zak Taccardi
02/21/2023, 11:38 PMVampire
02/21/2023, 11:50 PMtask.name already is just the name.
task.path is with the path.