Android Jack mockito 替代品 [英] Android Jack mockito alternative

查看:33
本文介绍了Android Jack mockito 替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许现在问这个问题还为时过早,但正如今天宣布杰克和吉尔一样,我对此感到非常兴奋.我真的很想去,但他们也说:

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:

读取 .class 文件的各种工具(例如 JaCoCo、Mockito 和一些 lint 检查)目前与 Jack 编译器不兼容.

jack 编译器已经有一个 mockito 替代品了?

There is already an mockito alternative for jack compiler ?

推荐答案

Mockito 在编译时不会生成任何字节码,因此不受所使用的编译器的影响.dexmaker 也是如此.(他们在构建过程中没有任何挂钩到 Gradle)

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)

因此,即使使用 Jack 编译器,您也可以继续使用 Mockito.请注意,我有一个 测试项目 可以证实这一点.

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

这篇关于Android Jack mockito 替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆