Use using instead of with in dependency substitution rules

MSAL

Gradle 8.0 removed DependencySubstitutions.Substitution.with(ComponentSelector), so a rule substitute(a).with(b) fails with No signature of method in a Groovy script and Unresolved reference: with in a Kotlin one. This recipe renames it to using. It requires substitute(..) as the receiver, optionally through because(..), because with also names Kotlin's standard library function and Groovy's Object.with(Closure). See the Gradle upgrade guide for more information.

org.openrewrite.gradle.migrate.artifacts.UseUsingForDependencySubstitution
mod run . --recipe=org.openrewrite.gradle.migrate.artifacts.UseUsingForDependencySubstitution

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