Make sure these lines are in your build.gradle
plugins { java } dependencies { testImplementation('junit:junit:4.13') }
See Gradle Java tests for configuration information. In short:
There is nothing extra that needs to be done in order to use a specific artifact of Hamcrest. In the past, there were two JUnit Maven artifacts: junit:junit
and junit:junit-dep
, where the latter version did not include a bundled copy of org.hamcrest:hamcrest-core
and instead declared a transitive dependency on Hamcrest. In order to be more Maven-like, starting in version 4.11, there is only the junit:junit
artifact which uses a transitive dependency on hamcrest-core
.
Instead of using junit:junit
as your test dependency, you should use junit:junit-dep
along with specifying a particular Hamcrest library dependency beforehand. For example:
dependencies { testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3' testCompile group: 'junit', name: 'junit-dep', version: '4.10' testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3' testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.+' }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4