Find Gradle dependency

Apache 2.0

Finds dependencies declared in gradle build files. Each match is also recorded as a row in the DependenciesDeclared data table. See the reference on Gradle configurations or the diagram below for a description of what configuration to use. A project's compile and runtime classpath is based on these configurations.

Gradle compile classpath A project's test classpath is based on these configurations.

Gradle test classpath.

org.openrewrite.gradle.search.FindDependency

Required

The first part of a dependency coordinate identifying its publisher.

The second part of a dependency coordinate uniquely identifying it among artifacts from the same publisher.

Optional

The dependency configuration to search for dependencies in. If omitted then all configurations will be searched.

An exact version number or node-style semver selector used to select the version number.

Allows version selection to be extended beyond the original Node Semver semantics. So for example,Setting 'version' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre

mod run . --recipe=org.openrewrite.gradle.search.FindDependency \ -P groupId=com.google.guava \ -P artifactId=guava

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.