I am experimenting with migrating from build script plugins to the includeBuild style, similar to how Gradle itself and junit5 organize their build conventions. Unfortunately, simply adding an empty declaration results in an error claiming a circular task dependency.
// settings.gradle
includeBuild("gradle/plugins")
// gradle/plugins/settings.gradle
// empty
$ gradle build -m --no-build-cache -q
FAILURE: Build failed with an exception.
* What went wrong:
Circular dependency between the following tasks:
:caffeine:classes
\--- :caffeine:compileJava
+--- :caffeine:generateLocalCaches
| +--- :caffeine:compileJavaPoetJava
| | \--- :caffeine:jar
| | +--- :caffeine:classes (*)
| | +--- :caffeine:codeGenClasses
| | | \--- :caffeine:compileCodeGenJava
| | | +--- :caffeine:classes (*)
| | | +--- :caffeine:compileJava (*)
| | | \--- :caffeine:jar (*)
| | +--- :caffeine:compileCodeGenJava (*)
| | \--- :caffeine:compileJava (*)
| \--- :caffeine:javaPoetClasses
| \--- :caffeine:compileJavaPoetJava (*)
+--- :caffeine:generateNodes
| +--- :caffeine:compileJavaPoetJava (*)
| \--- :caffeine:javaPoetClasses (*)
\--- :caffeine:jar (*)
(*) - details omitted (listed previously)
To debug, I tried to remove various steps in hopes of finding the culprit, but at a minimal (non-functional) build it still has a dependency that I cannot explain,
Circular dependency between the following tasks:
:caffeine:classes
\--- :caffeine:compileJava
\--- :caffeine:jar
+--- :caffeine:classes (*)
\--- :caffeine:compileJava (*)
I am using 8.1-rc-3 and if I downgrade to 8.0.2 the problem persists.
Certainly there may be something that I am doing wrong, but the changing behavior for an empty included build is unclear and surprising.