Using "gradle publishToMavenLocal" and mavenLocal() and gradle is not resolving dependencies. How do I fix this? Seems like a bug to me

I’ve used “gradle publishToMavenLocal” to publish artifacts to a local maven repository. I then added the mavenLocal() to my repositories stanza in build.gradle, and the dependency for the local artifact, but gradle refuses to resolve it to the local maven repo and keeps looking in the other repo I have designated. What gives? I’ve seen some posts elsewhere where gradle developers claim this is fixed, but I’m using 2.2.1 and still NO DICE. HELP.

Contents of local maven repo: https://gist.github.com/laynes/4f19e3ca0a3b9e735d49

build.gradle: https://gist.github.com/laynes/0705697d802487bbec69

Does that artifact, or a Maven descriptor for that artifact, exist in the remove Maven repository. If so, Gradle will attempt to resolve that first and you may need to place ‘mavenLocal()’ first in your ‘repositories {…}’ block.

No, it does not, and I tried to put mavenLocal() first, but that also did not work. Build still failed because it could not locate the dependency.

Try running your build with the ‘-d’ command line argument. Might give some more insight into what is going wrong.