Last active
August 16, 2023 06:57
-
-
Save s1rius/5cd0a4fa8473852a4a2706e4bcb46e7c to your computer and use it in GitHub Desktop.
Print task input and output files when execute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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