Gradle with multiple subproject running tests

Viewed 22

Let's assume that I have such structure of a gradle project:

:app:api 
:app:domain 
:app:infra 
:app:libs:lib1 
:app:libs:lib2

Infra depends on lib1 and lib2.

As far as I know, if you run task test for infra, gradle by default runs all test tasks for all the dependent projects, which are: :app:libs:lib1 :app:libs:lib2

How can I disable this functionality? I want to run gradlew app:infra:test, I want to run tests just in infra and not to run tests in lib1 and lib2?

If I run gradlew test, then I want to run all the tests.

0 Answers
Related