instead of the (now deprecated) simpler, more readable, shorter, less verbose, ... :)
Copy code
webpackTask {
...
}
Thanks.
h
hfhbd
09/17/2023, 8:14 AM
In gradle build scripts, you can safely ignore the message, because gradle generates a receiver function for each declared Action.
n
Norbi
09/17/2023, 10:10 AM
Very good news, thanks 🙂
e
efemoney
09/17/2023, 11:15 AM
Ideally that DSL should have exposed only Action from the start. Kotlin does this thing where they expose both an Action & a lambda fro some APIs but its completely redundant, because in kotlin build scripts, SamWithReceiver makes it such that you can call the Action overload like its a lambda.
If the argument is that it looks better for plugin authors that depend on KGP, then they can always enable just the sam with receiver plugin within their own plugin compilation, and get the exact same benefits.
Again, completely redundant from KGP (and other plugin maintainers who do this)
🙏 1
👍🏻 1
v
Vampire
09/17/2023, 7:04 PM
Yeah, that's probably why they deprecated it. They cannot simply remove it as that would break binary compatibility with other plugins calling it. But at soon as the deprecated one is removed, the
Action
one is used automatically with the sam-with-receiver plugin. That's why you can ignore the deprecation warning when using it from build scripts.