Gradle 2.8.
If a project depends on itself you will have StackOverflowError instead of a friendly error message:
Caused by: java.lang.StackOverflowError at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:87) at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:89) at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:89) ...
In my case DefaultResolvedDependency.getAllModuleArtifacts is called from ‘ca.cutterslade.gradle:gradle-dependency-analyze’ plugin and circular dependency came from the parent buildfile via subprojects { dependency { … }}.