Gradle Kotlin DSL - Spring boot - parameter not working [java.lang.IllegalArgumentException: Name for argument of type...] - Integration Test

I have published on github, I hope I am not creating circular posts.

https://github.com/gradle/gradle/issues/30267 (github.com)

I read:

Why tasks.withType(JavaCompile) can’t work? - Help/Discuss - Gradle Forums

But not working for me.


    // tasks.withType<JavaCompile> {
     tasks.withType<JavaCompile>().configureEach {
    // tasks.withType(JavaCompile::class){

        options.compilerArgs.add("-parameters")
    }

Maybe you, or some plugin, uses setCompilerArgs after that line is evaluated and thus overwrite all previously added values.
Set a breakpoint on that method and see whether it is hit, especially after your add call.