When I deal with a new java source that is new to me, I usually debug and follow its behavior at runtime, see the states of objects, sometimes execute expressions on the go and observe how system works. That helps to learn the new source code very fast, even start solving problems without knowing it all.
Now with gradle which uses groovy (thus we lack compile time safety and proper autocompletion) I want to use same approach as gradle build is a magic to me yet. I want to set a breakpoint just like in regular java code, stop there, see what's available what objects have what states etc. Just looking around.
How do we do this with gradle?
Currently I'm doing something like this to have some idea whats some objects are consisted of etc., but that's clearly not enough.
import groovy.json.*
defaultTasks 'main'
apply plugin: 'java'
task main << {
println new JsonBuilder( convention ).toPrettyString()
}