Module has dependency
Apache 2.0Searches for Gradle Projects (modules) that have a dependency matching the specified id or implementing class. Places a SearchResult marker on all sources within a project with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file that use the dependency, use the FindDependency recipe instead.
org. openrewrite. gradle. search. ModuleHasDependencyRequired
Group glob pattern used to match dependencies.
Artifact glob pattern used to match dependencies.
Optional
Match only dependencies with the specified version. Node-style version selectors may be used.All versions are searched by default.
Match dependencies with the specified scope. If not specified, all configurations will be searched.
If enabled, transitive dependencies will not be considered. All dependencies are searched by default.
mod run . --recipe= org. openrewrite. gradle. search. ModuleHasDependency \
-P groupIdPattern= com. fasterxml. jackson. module \
-P artifactIdPattern= 'jackson-module-*'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.