This has eluded me for a very long time. I still don't know if there is a way for Eclipse with any plugins to realize that some gradle projects (in workspace) depend on other gradle projects (also in workspace) when these are coming from otherwise separate locations (e.g. separate source repos).
They end up not depending on each other but on published artifacts of one another. I had to code in explicit support in build scripts, as a part of the eclipseClasspath eclipse plugin for gradle to create Eclipse workspace bits while being told (on command line) that these other projects will exist in the workspace.
This is not only cumbersome and unmaintainable it also requires a pre-existing knowledge of what might be in the workspace, the names of those projects, cumbersome command line, etc.
Is there a solution to this or is one in sight / coming?
Example:
Say there is a "product" called "A". It can have multiple gradle projects in it, say "one" and "two". These are published to a maven or ivy style repo as A:one and A:two jar artifacts. Say that "two" depends on "one". You can import this into Eclipse and all will be fine. Eclipse project "two" will depend on Eclipse project "one", not on one.jar downloaded from maven/ivy repo.
There is another, separate product "B". It too has multiple gradle projects in it, say "foo" and "bar". Say that "bar" depends on "foo" and that "foo" happens to depend on A:one. All is still fine. If you import "B" projects into Eclipse, "bar" and "foo" projects will appear and "bar" will depend on "foo" the project, not the jar.... And foo will depend on auto downloaded A:one jar.
But someone has to work on both A and B at the same time. So they import all the projects into Eclipse workspace. They modify something in A:one (say fix a bug) and want to try that by running something from B. Their change won't be visible because B:foo depends on a previously downloaded published jar artifact of A:one, not the Eclipse project "one". This complicates debugging, verification, etc. Manually updating project dependencies is short lived - only until next dependency refresh.
Eclipse with Gradle IDE plugin installed has an option Remap Jars to Gradle Projects
under the Windows > Preferences > Gradle
dialog. I don't personally use it, but it should work for you.