Is there a nice way to add eclipse settings?

I want to create the following preferences for eclipse:

  • file encoding - line break character

This defaults to “inherit from container” on generated projects, which is bad for projects where developers use several operating systems. I think there should be a way to configure that.

Currently I write the files with the settings using whenMerged() on EclipseProject.

I’m having the exactly same issue.

Can you post your workaround, kung_foo? This will help in two ways: People will know how to apply the workaround, and the Gradle guys will know what to add to the plugin.

In general, the issue is that cleanEclipse does not know about the .settings folder and where to touch it, even though some settings relevant for JDT live there.

We fixed this by adding an extension to the eclipse plugen.

We then override the implementation of apply(Project) like this:

It is kinda a hacky way to do this, but it works for now…