gradle subproject dependencies as list of other subprojects

59 Views Asked by At

How can I get list of a subproject dependecies as list of Project object?
subproject.dependencies gives list of DependencyHandler objects. And I can't find how extract Project from DependencyHandler.

1

There are 1 best solutions below

0
Alexey On

After a short have found solution myself :)

subprojects {
    configurations.all {
        allDependencies.each {
            if (it instanceof ProjectDependency) {
                println it.dependencyProject
            }
        }
    }
}