I have a Gradle multi-project (Java) build. The structure of my solution looks as the following:
---Root
-----Common
-----Project1
-----Project2
Common, Project1 and Project2 are sub projects of Root. Both Project1 and Project2 dependent on Common. In gradle.build of Projects 1&2 I define this dependency as:
compile project(":common")
Until today everything worked fine. I was able to build any of projects without any issues.
Today, I changed signature of one of the methods inside Common (and successfully built it).
First, when I tried to compile Project1 or Project2, I started to receive compile error "expecting to have interface with [old signature], instead have [new signature]".
It looked like Project1 & Project2 did not received an updated version of Common, despite of declared dependency.
Then, I performed "clean" task on all projects.
Starting from this moment, both Project1 and Project2 failed to build with error "cannot resolve symbols of [class from Common]".
Obviously, Project1 and Project2 are not getting correctly Common dependency. I don't know what happened... What is more weird, is that IntelliJ shows like it recognizes classes from Common (imports are not grayed, no red lines or errors of any kind). But, Gradle build fails. It fails also if I trigger it directly from command line.
I was tried to delete Gradle cache (from .gradle folder), also cleaned cached from IntelliJ. Nothing helps.
Any help will be greatly appreciated.