Android Gradle app:connectedCheck runs tests from dependencies

后端 未结 2 1518
悲&欢浪女
悲&欢浪女 2021-01-11 09:03

I have some library project that has its own tests. I\'m not responsible for this library project and don\'t care about its tests, however, when I run gradle :app:conn

2条回答
  •  借酒劲吻你
    2021-01-11 09:47

    If you have a project dependency to this library, gradle wants to build and test it, since both is the usual build process of a java project. To avoid these test you can do one of this:

    1. like Krylez mentioned it in his comment you may just skip the specific test task with ./gradlew connectedAndroidTest -x :mylib:connectedAndroidTest
    2. you filter your tests in the test closure like it is explained here: http://www.gradle.org/docs/current/userguide/java_plugin.html#sec:java_test

提交回复
热议问题