Is there a nice way to add eclipse settings?


(kung_foo) #1

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.


(toolforger) #2

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.


(kung_foo) #3

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

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

https://gist.github.com/kungfoo/dac9a5433678f4bfb792

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