Improvements to the Gradle DSL resolver

The existing DSL resolver for the android extension treated
resolved a method of form: method(Action<T>) directly to its
definition in the plugin. However, the IDE infrastructure
doesn't really understand that an Action<T> is similar to
a Closure<T>.

This CL looks at the type signature of the method being
resolved to, and if it is of the Action<T> form, then it
resolves to a method that takes a closure.

As a bonus, this allows completions to work within all
the closures. This CL adds a few tests that checks that
the appropriate completions are returned.

Change-Id: Ifbc9f2fe17c59660224071a4a06e559057b30593
6 files changed