thana
08/13/2019, 2:50 PMtasks.withType(Test::class).configureEach(object : Action<Test> {
override fun execute(it: Test) {
it.outputs.upToDateWhen { false }
}
})
Yet when i do it manually or let intellij do it for with following result:
tasks.withType(Test::class).configureEach {
it.outputs.upToDateWhen { false }
}
It complains that it is undefined. Any idea why?kingsley
08/13/2019, 2:55 PMconfigureEach takes T.() -> Unit, so you can just do outputs.upToDateWhen { ... } without the itthana
08/13/2019, 2:58 PMconfigureEach that takes an Action as argument 😕louiscad
08/13/2019, 2:59 PMAction lambdas in Gradle use receiver instead of it.thana
08/13/2019, 3:07 PMlouiscad
08/13/2019, 3:15 PM@ImplicitReceiver annotations on such types.