First put a the following init.d gradle script in ${HOME}/.gradle/init.d/ (currently in build.gradle but not working in init):
allprojects {
tasks.withType(Compile) { // Use JavaCompile for gradle > 2.0
options.compilerArgs << "-Xlint:deprecation"
}
task printDependencies << {task -> println "Subproject -> $task.project.name" }
}
subprojects {