Build project referencing source jars from other projects

(Geoffrey Knauth) #1

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?