mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
Previously, GradleProjectContributor was responsible for delegate resolving in closures of several Project methods. It was a hardcoded logic: if Closure is a parameter of method foo() from class Project, then let delegate be CLASS_NAME. The new logic implemented in GradleDelegatesToProvider is more flexible. It allows determining a delegate if a called method with Closure has overloaded method with Action<? super AnyDelegateClass>. It covers almost all the cases supported by GradleProjectContributor, and gets triggered before it. So all covered cases were removed from there, except the delegate resolving for Project#configure(...) method. Project#configure(...) has a version with Action<? super T> parameter, but it's not possible to surely resolve T if the version of this method with Closure was called. This commit also has tests covering considered cases for Project. GitOrigin-RevId: e1088ad60a61868856aca4dc0b8e943bc7e04e5f
6.8 KiB
6.8 KiB