Skip to content

Instantly share code, notes, and snippets.

@hsz
Created May 19, 2021 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsz/10e76c426fb2add0729864e7e9b9cae8 to your computer and use it in GitHub Desktop.
Save hsz/10e76c426fb2add0729864e7e9b9cae8 to your computer and use it in GitHub Desktop.
Run Gradle tasks in verbose mode printing all the input paths
// in build.gradle: apply(from = "verbose.input.files.gradle")
gradle.taskGraph.afterTask { task ->
StringBuffer taskInfo = new StringBuffer()
taskInfo << """"-------------
name:$task.name group:$task.group : $task.description
conv:$task.convention.plugins
inputs:
"""
task.inputs.files.each{ it ->
taskInfo << "${it.absolutePath}\n"
}
taskInfo << "outputs:\n"
task.outputs.files.each{ it ->
taskInfo << "${it.absolutePath}\n"
}
taskInfo << "-------------\n"
println taskInfo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment