Add -parameters compiler flag for Spring in Gradle
MSALAdds options.compilerArgs.add("-parameters") to JavaCompile tasks and, when the Kotlin Gradle Plugin version can be determined from this file's plugins {} block, the matching javaParameters flag (compilerOptions.javaParameters on 1.8+, kotlinOptions.javaParameters on older versions) to Kotlin compile tasks. Spring uses parameter name retention for dependency injection. Projects using the Spring Boot Gradle plugin already have both flags configured and are not modified. When the Kotlin plugin's version can't be determined from this file (version catalogs, convention plugins, buildscript classpath declarations) the Kotlin flag is left alone rather than risk emitting a form the applied plugin doesn't support.
org. openrewrite. gradle. spring. AddParametersCompilerFlagToGradlemod run . --recipe= org. openrewrite. gradle. spring. AddParametersCompilerFlagToGradleInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.