I can query the dependency tree for a Gradle project with ./gradlew -q dependencies.
./gradlew -q dependencies
I can also run the query for the service subproject with
service