I can\'t understand how JUnit 4.8 should work with Hamcrest matchers. There are some matchers defined inside junit-4.8.jar in org.hamcrest.CoreMatchers
. At the
In 2018 using most modern libraries:
configurations {
all {
testCompile.exclude group: "org.hamcrest", module: "hamcrest-core"
testCompile.exclude group: "org.hamcrest", module: "hamcrest-library"
}
}
dependencies {
testCompile("junit:junit:4.12")
// testCompile("org.hamcrest:hamcrest-library:1.3")
// testCompile("org.hamcrest:java-hamcrest:2.0.0.0")
testCompile("org.hamcrest:hamcrest-junit:2.0.0.0")
}