Android Studio 3.0 gradle 3.0.0-beta2, breaks Kotlin Unit Test Coverage?

南笙酒味 提交于 2019-11-30 08:42:41

In case anyone is still looking for a solution, adding in a gradle task to copy the cases from the tmp directory into the directory that the coverage output looks in helps with this issue as a workaround.

For example add copyTestClasses to your module gradle file

task copyTestClasses(type: Copy) {
    from "build/tmp/kotlin-classes/debug"
    into "build/intermediates/classes/debug"
}

And then setting up your defaults to run the gradle task before running the tests

It can help to find both of the directories in your project manually before trying to point to them using gradle, to make sure that you're pointing to the right place (flavours will change the directories that you need to point to)

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