Last active
August 8, 2023 11:22
-
-
Save myniva/80b9f98b7eac5b55584d2d1f536b23d5 to your computer and use it in GitHub Desktop.
Prints all inputs of the various tasks of a Gradle project
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
task printTaskInputs { | |
doLast { | |
project.getTasks().each { task -> | |
println "--------------------------------------------------------------------------------" | |
println " Task '${project.name}:${task.name}'" | |
println "--------------------------------------------------------------------------------" | |
println "" | |
println "File inputs:" | |
task.inputs.files.each { | |
println " - ${it}" | |
} | |
println "" | |
println "Property inputs:" | |
task.inputs.properties.each { | |
println " - ${it}" | |
} | |
println "" | |
println "--------------------------------------------------------------------------------" | |
println "" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kotlin DSL