Is it possible to test against the release version of your app with Android Gradle plugin?

╄→гoц情女王★ 提交于 2019-12-22 03:48:47

问题


When I use the 'gradlew connectedCheck' command it always build the debug version and test against the debug version of my app. Is it also possible to test against the release version of my app?

I want to enable proguard and want to make sure that it doesn't filter anything out that is needed during runtime.


回答1:


You can only test against a single build type right now (though that may change).

To set the build type to test against:

android {
    testBuildType "release"
}

You could set this dynamically through a env var to not have to edit build.gradle all the time.



来源:https://stackoverflow.com/questions/18060716/is-it-possible-to-test-against-the-release-version-of-your-app-with-android-grad

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