./gradle tasks lists \"some\" of the tasks. Looking at
http://gradle.org/docs/current/userguide/java_plugin.html there are hidden ones not listed. Also, othe
Following the answer by cstroe, the following also prints the input and output files of each Gradle task. This is useful since dependencies are sometimes defined by input/output relations. I.e., if task B uses the outputs of task A, cstroe's answer won't show you the dependency. The following is very primitive but does show the list of input and output files for each task:
gradle.taskGraph.whenReady {taskGraph ->
println "Found task graph: " + taskGraph
println "Found " + taskGraph.allTasks.size() + " tasks."
taskGraph.allTasks.forEach { task ->
println()
println("----- " + task + " -----")
println("depends on tasks: " + task.dependsOn)
println("inputs: ")
task.inputs.getFiles().getFiles().collect { f -> println(" - " + f)}
println("outputs: ")
task.outputs.getFiles().getFiles().collect { f -> println(" + " + f)}
}
}