External Project compile dependency rootDir property override

Hi All,

I am trying to build a project which depends on anther project( the source of which is not in my control). The other project is a multi module project.

MyProject

|___build.gradle

|___settings.gradle

depends on

DependentProjectRoot ( Not in my control)

|

|___config.xml

|

|___settings.gradle

|

|___Module 1

|

|___Module 2

|

|___Module 3

MyProject has a dependency on Module 2 and 3 for which I have added a compile project(:DepedentProject:Module1) in my build.gradle. When I fire my build, the build fails while building the Dependent Project as the rootDir property points to MyProject directory henc the build.gradle in DependentProject fails to find “rootDir”/config.xml file.

Now can I make sure rootDir and rootProject points to the corresponding projects which are being build as part of compile time dependency?

Thanks and Regards, Rahul

A project dependency isn’t really appropriate in this case, since they are not designed to be used across multiple multi-project builds. If you depend on a module from a disparate Gradle build then you should use an external module dependency, published to some artifact repository, such as maven local.