I'm not sure if this is intended behavior, but the following scenario occurs:
Project A has subprojects project(':sub1') and project(':sub2') that produce jars. :sub1 depends on :sub2 under the compile configuration. Project A is built and its jars are uploaded.
Project B has dependencies on both jars produced by A. Project B is built successfully and brings A's jars into the gradle cache.
Project A's :sub2 has code changes and is rebuilt with compileJava. Project A fails to build because :sub1 is now referencing the jars of :sub2 in the cache instead of the jar created by the :sub1:jar task.
I'm expecting :sub1 to reference the jar changes in :sub2:jar and not what was uploaded to the archives.