Where does that property it stored in gradle?
subprojects {
println it.class.name // DefaultProject_Decorated
dependencies {
println it.class.name // DefaultDependencyHandler_Decorated
Because it should not be the default it property of the closure. Or it should?
I think it something like def it = this or maybe I am wrong?
In groovy closures, it is the default parameter passed to the Closure.
So:
def friendly = { "Hello $it" }
assert friendly('tim') == 'Hello tim'
So in the above cases, Gradle passes the object that the closure is helping to configure into the closure itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With