Skip to content

Instantly share code, notes, and snippets.

@s1rius
Last active August 16, 2023 06:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Print task input and output files when execute
gradle.taskGraph.afterTask { task ->
StringBuffer taskDetail = new StringBuffer()
taskDetail << """---
name: $task.name group: $task.group $task.description
inputs:
"""
task.inputs.files.each { it ->
taskDetail << "${it.absolutePath} \n"
}
taskDetail << "outputs: \n"
task.outputs.files.each { it ->
taskDetail << "${it.absolutePath} \n"
}
taskDetail << "---"
println taskDetail
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment