Run espresso tests after proguard

倾然丶 夕夏残阳落幕 提交于 2019-12-10 20:36:49

问题


I am searching a way to run my espresso-tests after proguard was running - This should be a safety-net for a miss-configured proguard ( just had this after updating butterknife to 7.0 and forgot to update the proguard config )


回答1:


Assuming that you are proguarding your APK using the standard mechanisms built into the Android Gradle build system (setting 'minifyEnabled true' for a particular buildType), you can test your 'proguarded' APK by setting the testBuildType as described here and running your connectedAndroidTest task as normal.

For instance, if your 'release' buildType was the one configured to have proguard run against it, you would add the following to your gradle file:

android {
    testBuildType "release"
}


来源:https://stackoverflow.com/questions/31819619/run-espresso-tests-after-proguard

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