I’m experiencing a strange sort of behavior that smells a little like a bug in the incremental build logic for Gradle, but perhaps it’s a problem on our end.
My setup is:
- Gradle 4.7
- Java 8
- Multi-project build
- Project A’s default configuration declared as a compile dependency for Project B
- Project B’s default configuration declared as a compile dependency for Project C
When I make changes in the interface of one of the classes in Project A and then build all my modules, I can see in the debug output that the classes in Project C’s classes directory that use classes in Project A are being deleted, as one might expect, but then this message is shown: "20:40:27.857 [INFO] [org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler] None of the classes needs to be compiled! "
I end up with an empty classes directory and therefore a less than functional jar file. Strangely, this seems to occur only when Project C is just a bare-bones project without much of its own functionality, but I don’t quite understand why.
Does this ring a bell with anyone?