Call get() on Kotlin DSL configuration accessors
MSALGradle 8.0 removed the Kotlin DSL extensions that let a script reach the members of a Configuration directly from a NamedDomainObjectProvider<Configuration>, so configurations.compileClasspath.files fails to compile with Unresolved reference: files. This recipe inserts .get() for the members the upgrade guide lists. Generated accessors don't resolve when a script is parsed without its build's generated code, so the recipe matches the shape configurations.<name>.<member> rather than the type of <name>. Values obtained from by configurations.creating or getByName(..) are already a Configuration, and don't have this shape. See the Gradle upgrade guide for more information.
org. openrewrite. gradle. migrate. artifacts. UseGetOnConfigurationAccessorsmod run . --recipe= org. openrewrite. gradle. migrate. artifacts. UseGetOnConfigurationAccessorsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.