Local Project Dependency with Multiple Root Projects

I have an Eclipse workspace with a few existing Eclipse projects. One project is intended to be an “integration project” which eventually use the dependencies produced by the other “root level subproject”. In this “integration project” lib folder, I want to hold shared dependencies which I was hoping to use as the basis for dependencies in the sub project. Due to the existing projects directory structure, I don’t have a single root project with subprojects underneath it.I have multiple “root level projects” with dependencies between each other.

So the directory structure is basically like the following:

Eclipse Workspace

  • IntegrationProject
    | ± lib
    | | ±- LocalDependencyOne
    | | | ±-CommonSharedJar
    | | ±- LocalDependencyTwo
    | | ±-AnotherCommonSharedJar
    | |
    | ± builld.gradle
    | ± settings.gradle (has include ‘SubProject’)
  • SubProject
    ± builld.gradle
    ± src
    ± package…name
    ± SomeClass.java

Basically the "SomeClass.java’ has a dependency on CommonSharedJar stored locally in “integration project”. When trying to :compileJava for SubProject, it can’t find the dependency packaged contained in CommonSharedJar.

In the SubProject build.gradle, I tried adding
dependenicies compile project(‘IntegrationProject’) and/or compile project(’:IntegrationProject’) none of which seem to get any visibility to the “IntegrationProject” related jars.

Do I need to add a classpath dependency in someway?

I think I may be sort of trying to have a “local repository” in this “integration project” folder. Do I need to have a “repository” entry pointing to this other folder in some way?

Is it possible to do “…” type reference in some way (i.e. in Subproject, reference jar using something like a relative path outside of the project folder like "…/IntegrationProject/lib/*/*jar )?

What is the proper way to do this?