Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a warnings policy #678

Closed
HoldYourWaffle opened this issue Mar 16, 2018 · 1 comment
Closed

Setting a warnings policy #678

HoldYourWaffle opened this issue Mar 16, 2018 · 1 comment

Comments

@HoldYourWaffle
Copy link

Is it possible to set the project-specific warning settings from gradle?

In some projects (like utility libs) I don't care about module leaks, some projects still use raw types for some reason, others don't care or have to use deprecated libraries and I'm sure there are a lot more reasons why people might want to set a warning policy (both enforcing or ignoring certain warnings).

I'm not familiar enough with the internals of eclipse to figure this out on my own, but from what I've seen these settings are not stored in the project XML but in some settings file instead. Is it possible to modify these from gradle? Any help would be greatly appreciated 😄

@donat
Copy link
Contributor

donat commented Apr 19, 2018

Unfortunately, there's no official way to do that.

The project-specific settings are stored preferences files in the .settings folder in your Gradle project. For example, the JDT compiler settings are in the ${project_dir}/.settings./org.eclipse.jdt.core.prefs file. As a simple solution, you could just commit the entire folder into your VCS.

You can also generate or modify these files with custom Gradle tasks of course. Unfortunately, you have to call these tasks manually at the moment to bootstrap your IDE. But, you should keep an eye on the #265 (run tasks on sycnhronization) as we'll implement it after we release Buildship 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants