Declaring mockito dependency

szczepiq edited this page Jan 4, 2015 · 3 revisions

Recommended way of getting Mockito is declaring a dependency on "mockito-core" library using your favorite build system. With Gradle one can do:

repositories { jcenter() }
dependencies { testCompile "org.mockito:mockito-core:1.+" }

Maven users can declare a dependency on mockito-core. Mockito is automatically published to Bintray's jcenter and synced to the Maven Central Repository.

Legacy builds with manual dependency management can use 1.* "mockito-all" distribution. It can be downloaded from Mockito's Bintray repository or Bintray's jcenter. "mockito-all" distribution has been discontinued in Mockito 2.*.