mockito / mockito-kotlin

Using Mockito with Kotlin
MIT License
3.09k stars 198 forks source link

Build Error #438

Closed edurocks closed 1 year ago

edurocks commented 2 years ago

Good Afternoon, When I try to compile my project with the dependency it gives me the following error:

Could not download mockito-kotlin-2.2.0.jar (com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0)

Could not get resource 'https://jcenter.bintray.com/com/nhaarman/mockitokotlin2/mockito-kotlin/2.2.0/mockito-kotlin-2.2.0.jar'. Could not GET 'https://jcenter.bintray.com/com/nhaarman/mockitokotlin2/mockito-kotlin/2.2.0/mockito-kotlin-2.2.0.jar'.

What should I do in order to fix this error? Thanks.

Best Regards, José Costa

sphrak commented 2 years ago

@edurocks its because jcenter/bintray shut down. You can still use it via jitpack tho however its not ideal -- note the package name is com.github.* instead of com.nhaarman.* since its autopublished by jitpack.. https://jitpack.io/p/nhaarman/mockito-kotlin

edit: seems like 2.2.0 is published on maven central https://search.maven.org/artifact/com.nhaarman.mockitokotlin2/mockito-kotlin

TimvdLippe commented 1 year ago

Closing per above comment.