Question about dependency API


(Matheus Cabral) #1

Hi, I want to do the following code but not only with the declared dependencies but also if ALL transitive dependencies.

configurations.desktop.allDependencies.each { dep ->

println dep.group + ’

’ + dep.name + ’ ’ + dep.version }


(Peter Niederwieser) #2

If you just need the files, the simplest solution is ‘configurations.desktop.each { println it }’. Otherwise, you can make use of methods like ‘Configuration.getResolvedConfiguration()’ to dig deeper. See the DSL/API documentation for details.


(Matheus Cabral) #3

Thanks. It worked.