# External Project compile dependency rootDir property override

**URL:** <https://discuss.gradle.org/t/external-project-compile-dependency-rootdir-property-override/1282>\
**Category:** Old Forum Archive\
**Created:** [December 8, 2014, 9:53am UTC](https://discuss.gradle.org/t/external-project-compile-dependency-rootdir-property-override/1282 "2014-12-08T09:53:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rahul](https://discuss.gradle.org/u/Rahul)\
**Post date:** [December 8, 2014, 9:53am UTC](https://discuss.gradle.org/t/external-project-compile-dependency-rootdir-property-override/1282/1 "2014-12-08T09:53:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [December 8, 2014, 5:26pm UTC](https://discuss.gradle.org/t/external-project-compile-dependency-rootdir-property-override/1282/2 "2014-12-08T17:26:00Z")

</div>

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.
