So a build.gradle file is basically a Groovy closure whose delegate is a Project object, and it has methods such as dependencies and repositories to which we pass additional closures. How is it that a statement like:
dependencies{
testCompile 'junit:junit:4.12'
}
triggers a DependencyHandler.add(String configurationName, Object dependencyNotation) call? Is this some special Groovy feature?