The Configuration#files
method expects a predicate. (For API details, see Configuration
in the Gradle Build Language Reference.) If you instead pass it a closure containing a println
statement, (seemingly) strange things will happen. You probably want something like the following instead:
// configurations should only be resolved in
// the execution phase, so let's declare a task
task printLibs {
doLast {
configurations.libs.each { println it }
}
}