Use named("x") instead of "x"() in the Kotlin DSL

MSAL

Looking up a domain object with "x"() in the Kotlin DSL is deprecated and does not compile on Gradle 9. named("x") returns the same provider. "x"(Type::class) and "x" { } are still supported, so only the form with no arguments and no lambda changes. A call inside withGroovyBuilder { } is a Groovy-builder invocation on the receiver rather than a container lookup, so it is left alone. Groovy is not affected. See the Gradle upgrade guide for more information.

org.openrewrite.gradle.migrate.tasks.UseNamedInsteadOfStringInvoke
mod run . --recipe=org.openrewrite.gradle.migrate.tasks.UseNamedInsteadOfStringInvoke

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