Use safe project source-set dependencies

Apache 2.0

Replace direct Groovy compileOnly project(':path').sourceSets.main.runtimeClasspath declarations with the project's consumable runtimeElements dependency and task-backed main output. This retains classes, resources and runtime dependencies without resolving another project's configuration, which Gradle 9 forbids during parallel execution. Other non-resolving sourceSets reads use an explicit Project lookup. Only literal absolute paths in unshadowed canonical dependencies configurations are migrated; ordinary project dependencies are retained.

org.openrewrite.gradle.gradle9.UseProjectForSourceSets
mod run . --recipe=org.openrewrite.gradle.gradle9.UseProjectForSourceSets

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