Exclude Gradle dependency
Apache 2.0Exclude the specified dependency from any direct dependency declaration that transitively includes it. The exclusion is attached to each matching direct dependency, mirroring Maven's per-dependency <exclusions> behavior. Supports both Groovy and Kotlin DSL build scripts.
org. openrewrite. gradle. ExcludeDependencyOptional
The first part of a dependency coordinate com.google.guava:guava:VERSION. If omitted (or *), the exclude targets every group containing the given artifact. Partial wildcards are not supported.
The second part of a dependency coordinate com.google.guava:guava:VERSION. If omitted (or *), the exclude targets every artifact in the given group. Partial wildcards are not supported.
If specified, only direct dependency declarations in that configuration are considered. If omitted, declarations in every configuration are considered.
mod run . --recipe= org. openrewrite. gradle. ExcludeDependencyInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.