buildship icon indicating copy to clipboard operation
buildship copied to clipboard

Support -parameters compiler option

Open mauromol opened this issue 3 years ago • 1 comments

Expected Behavior

When setting this in my build.gradle:

tasks.withType(JavaCompile) { 
	options.compilerArgs << '-parameters' 
}

I would expect to have the JDT option org.eclipse.jdt.core.compiler.codegen.methodParameters set to generate in .settings/org.eclipse.jdt.core.prefs file.

Context

This is a well known and useful compiler option. I think Buildship should support it out of the box.

Meanwhile, could you suggest a workaround please? I tried to add this (after applying the eclipse plugin), but it does not work:

eclipse {
  jdt {
    file {
      withProperties { props ->
        props['org.eclipse.jdt.core.compiler.codegen.methodParameters'] = 'generate'
      }
    }
  }
}

It seems like the withProperties closure is never executed when I do a Refresh of the Gradle Project.

mauromol avatar Mar 16 '21 18:03 mauromol