on migrating to gradle 5.0 following configuration...
# gradle
t
on migrating to gradle 5.0 following configuration:
Copy code
tasks {
     val processTestResources: ProcessResources by getting
}
starts to fail the build with:
Copy code
Script compilation errors:

  Line 126:     val processTestResources: ProcessResources by getting
                                                              ^ Property delegate must have a 'getValue(Nothing?, KProperty<*>)' method. None of the following functions is suitable: 
                                                                  public operator fun <T> ExistingDomainObjectDelegate<out Task!>.getValue(receiver: Any?, property: KProperty<*>): Task! defined in org.gradle.kotlin.dsl

  Line 126:     val processTestResources: ProcessResources by getting
                                                              ^ Type mismatch: inferred type is CapturedType(out (org.gradle.api.Task..org.gradle.api.Task?)) but ProcessResources was expected

2 errors
Any clues why and how to fix it?