# Build project referencing source jars from other projects

**URL:** <https://discuss.gradle.org/t/build-project-referencing-source-jars-from-other-projects/24247>\
**Category:** Help/Discuss\
**Created:** [September 28, 2017, 5:50pm UTC](https://discuss.gradle.org/t/build-project-referencing-source-jars-from-other-projects/24247 "2017-09-28T17:50:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gknauth](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/gknauth/32/6489_2.png) [@gknauth](https://discuss.gradle.org/u/gknauth)\
**Post date:** [September 28, 2017, 5:50pm UTC](https://discuss.gradle.org/t/build-project-referencing-source-jars-from-other-projects/24247/1 "2017-09-28T17:50:31Z")

</div>

I am building a Java project, call it A. A has sources in `A/src/main/java`. There are other projects B, C, D (more, actually), and they have `B/src/main/java`, `C/src/main/java` , `D/src/main/java`. When I took over this project A, I noticed that the old JBuilder build script for A referenced the sources of B, C and D in parallel directories. I don’t like that, because source files in those other directories could change. I want to modify the build, using Gradle, so that versioned sources of the other projects are pulled from a local Maven repo, and, from A’s perspective, during compilation I reference the source `.zip` files of the other projects. Can I do that with Gradle?
