Use one dependency declaration per statement
MSALThe Gradle Groovy DSL accepts multiple coordinates in a single configuration call (e.g. implementation 'a:b:1.0', 'c:d:2.0'), but the Kotlin DSL does not. Gradle's best practices recommend declaring a single dependency per statement; see the Gradle dependency best practices. This recipe splits multi-coordinate Groovy DSL configuration calls into one call per coordinate. Run this as a cleanup pass before other dependency-aware recipes (e.g. UpgradeDependencyVersion, ChangeDependency, RemoveDependency): those recipes use the GradleDependency trait, which only inspects the first argument of a configuration call. Coordinates in later positions are invisible to them until this recipe reshapes the source into one declaration per statement.
org. openrewrite. gradle. migrate. artifacts. OneDependencyDeclarationPerStatementmod run . --recipe= org. openrewrite. gradle. migrate. artifacts. OneDependencyDeclarationPerStatementInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.