We recently adopted Gradle and are very pleased with its powerful framework. Being from a pure java world, we start to wonder some internal plumbing of the DSL with Groovy.
For example, in the dependencies block:
dependencies{
compile 'commons-net:commons-net:1.3.0'
......
}
By default, “dependencies” is a method, DefaultProject.dependencies(Closure), which calls ConfigureUtil.configure(Closure configureClosure, T delegate), which in turn to call ClosureBackedAction.execute(). I lost here as “compile” seems not a method for the delegated configuration containers. Is it dynamically created? Where is the code to take care of this? Being from Java world, I guess there is some Groovy magic here. What is it?
Generally, I would appreciate if there is some general guide about how to read the Gradle source code. I was able to generate a IntelliJ project on it using gradle and to import the whole project into the IDE. But it would still be nice if I can find some general description about the internal structure of different packages/subprojects and other basic information. For example, how to set a simple run configuration in IDE to run a simple test, where I can set some break points in debugging mode and learn more? Thanks.