I have the following in build.sbt:
libraryDependencies += \"com.novocode\" % \"junit-interface\" % \"0.10\" % \"test\"
libraryDependencies
Use junit-interface 0.11 to avoid the dependency on junit-dep:
libraryDependencies += "junit" % "junit" % "4.12" % "test"
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
UPDATE: junit-interface 0.11 makes this reliable by depending on junit rather than junit-dep.
I would do this:
libraryDependencies ++= Seq(
"junit" % "junit" % "4.11" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
exclude("junit", "junit-dep")
)
By excluding what we don't desire, it doesn't interfere. This doesn't depend on ordering.