Using the method “void dependencies(Closure configureClosure)” I can configure the dependencies of my projects.
In this case the “dependencies” function is passed a configuration closure whose delegate is an object of type “DependenciesHandler”.
What is don’t understand is how the line "compile ‘org.codehaus…’ can work. The DependencyHandler interface does not have a property called “compile”. Rather it seems that the function “Dependency add(String configurationName, Object dependencyNotation)” is called with “compile” and “org.codehaus…” as its two arguments.
However the function name “add” does not have to be written. Why?