I inherited a bunch of code that’s built by gradle. There a bunch of build.gradle files scattered through the directory structure. I want to get rid of dependency to Mockito, for example. But when I execute this command in the root directory of the project cat build.gradle|grep mockito , I get nothing. Yet when I run gradle :svc-bip-api:dependencies |grep mockito, I get a bunch of stuff as seen below.
How can I find out where this dependency is declared?
Unlike most other tasks, the dependencies task only runs on one project.
To run it on all projects you either need to make the root project dependencies task depend on the other projects dependencies tasks, or call them all explicitly (can also be done in one Gradle invocation), or declare another task of the type that task has for all projects as that would behave like the other tasks.