Use <sourceSet>Implementation and <sourceSet>RuntimeOnly for custom source sets

MSAL

Gradle 7.0 removed the <sourceSet>Compile and <sourceSet>Runtime configurations, so declaring a dependency on one fails, or in a Kotlin script's string form reports that the configuration was not found. This recipe renames them to <sourceSet>Implementation and <sourceSet>RuntimeOnly, in dependency declarations and as the configurations of extendsFrom inside a configurations { } block. It acts only where the prefix is proven to be a source set: an entry of a sourceSets { } block or a test suite in this script, or the configurations of the GradleProject model. A configuration this script declares itself, such as fooCompile in configurations { }, is left alone, and so are main and test, which ChangeDependencyConfiguration covers. See the Gradle upgrade guide for more information.

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

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