All project dependency related methods return empty list

Hi,

I have a project setup where a master project A has project B,C,D in its settings.gradle

In C I have a compile dependency on B: dependencies {compile project(B)}

In D I have a compile dependency on C: dependencies {compile project©}

When I call some of the methods below on D I get only empty lists - which I didn’t expect at all. Shouldn’t the compile dependency of D on C and C on B be somehow reflected in the output of those methods:

println project.getAllprojects()

println project.getChildProjects()

println project.getDependsOnProjects()

println project.getSubprojects()

Especially project.getDependsOnProjects() curiously returns an empty list. What’s going on?

How do I get what I want (a list of the compile-time dependent projects of Project D)?