Stackoverflow in Eclipse plugin

It is probably not about sub-projects. It is because in my case sub project A depends on sub project B (compile time) and sub project B depends on sub project A (test compile time). This is a legal Gradle configuration but does not work with the Kotlin plugin.