Slackbot
07/06/2023, 7:32 PMMikhail Lopatkin
07/06/2023, 7:45 PMgradle.taskGraph.allTasks.none { it.name == "updateReadme" }
into provider
and get
it inside the task should do the trick, but you'll lose laziness - CC evaluates all such providers at store time.Vampire
07/06/2023, 7:47 PMVampire
07/06/2023, 7:48 PMprovider *{* _gradle_._taskGraph_._allTasks_ *}
and using that inside should do, shouldn't it?*Mikhail Lopatkin
07/06/2023, 7:50 PMTask
references. Unless Slack formatter garbled your code and you meant serializing the list of task namesVampire
07/06/2023, 7:52 PMval foo by tasks.registering {
val foo = provider { gradle.taskGraph.allTasks }
doLast {
println(foo.get())
}
}
seems to work fineVampire
07/06/2023, 7:52 PM21:51:40: Executing 'foo --configuration-cache'...
Reusing configuration cache.
> Task :foo
[task ':foo']
BUILD SUCCESSFUL in 160ms
1 actionable task: 1 executed
Configuration cache entry reused.
21:51:41: Execution finished 'foo --configuration-cache'.
Mikhail Lopatkin
07/06/2023, 7:54 PMVampire
07/06/2023, 7:55 PMgw foo help
it indeed breaks, thanks.Vampire
07/06/2023, 7:57 PMprovider *{* _gradle_._taskGraph_._allTasks_._map_ *{ it*.name *} }
or* provider *{* _gradle_._taskGraph_._allTasks_._map_ *{ it*.path *} }
, thanks*Vampire
07/06/2023, 8:02 PM