Scala compilation does not resolve dependencies correctly when not using jcenter

This is indirectly linked to [SOLVED] Strange issue when using local Ivy repo:

I am not sure what is the cause of this as I inspected the ivydata-0.3.7.properties and the ivy.xml for the local zinc and it all seems to list the appropriate metadata & transitive dependencies correctly

This is easily reproducible via https://github.com/ysb33r/GradleLectures/tree/GradleScalaIssue_MkJug:

  • Clone the repo
  • Run ./gradlew syncR which will create a local Ivy repository
  • Now cd examples/jvm-scala
  • Edit the build.gradle files and comment out the repositories block.
  • ../../gradlew scalaCompile

It seems that if the Ivy Repo is created as a gradle pattern it will resovle correctly. Is this a bug in Gradle’s resolver by any chance?

This branch https://github.com/ysb33r/GradleLectures/tree/MkJugMar2016 has a working example, compared to the branch mentioned above.