This message was deleted.
# kotlin-dsl
s
This message was deleted.
v
How is
tasks.configureEachWithType<Foo> { ... }
so much better than
tasks.withType<Foo>().configureEach { ... }
?
t
yeah, too long name helper method name. What about
configureEach<T : Task>(action: Action<T>)
?
v
I guess that would conflict with the existing
configureEach
?
🤔 1
c
I must say i don't see any benefit over the current api
f
Fewer ways of doing things results in fewer ways to do things wrong. The
withType
can be used to configure, so everyone needs to remember that they need to call
configureEach
afterwards. If
configureEach
directly offers a reified version to filter by type it's simply easier.
☝️ 1
c
@Fleshgrinder but you say replacing, not adding a new API
f
Sorry, I somehow missed your reply. I would replace, yes. Reducing the amount of functions exposed in the APIs is always a good thing, since it makes things easier to use. It's hard with Gradle in general, at least I find myself often casting things to some
*Internal
or
Default*
because the APIs that are needed to get things done are not exposed, but that's basically what this is about: expose the right stuff (correct) via public APIs, and eat your own dog food. This is being done in some places, but not in others. I would normally contribute via PRs, but so far all my PRs got ignored, so I stopped contributing to Gradle.