Android Jack mockito alternative

你离开我真会死。 提交于 2019-12-03 15:33:57

问题


Maybe is too soon to ask, but as Jack and Jill was announced today I get very excited with it. I really want to go for it, but they also state:

Various tools that read .class files (such as JaCoCo, Mockito, and some lint checks) are currently not compatible with the Jack compiler.

There is already an mockito alternative for jack compiler ?


回答1:


Mockito doesn't generate any byte code at compile time and hence is not affected by the used compiler. Same holds true for dexmaker. (they don't have any hooks into Gradle during build)

So you can simply continue to use Mockito, even with Jack compiler. Note that I have a test project which confirms this.



来源:https://stackoverflow.com/questions/35917993/android-jack-mockito-alternative

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!