How to suppress gradle deprecation warnings


(Louis Bergelson) #1

I would like to update to gradle 4.2, but I start getting a deprecation warning on every clean build. The warning is because of a newly deprecated API in one of the plugins I’m using. Is there a way to suppress this warning in my build file?

A newer version of the plugin isn’t yet available. Since the warning doesn’t specify that it’s coming from one of the plugins, it makes it seem like it’s a failure in our code. I know people will start filing tickets about the warning, and since it’s not a problem until we choose to upgrade to 5.0 I’d like to just hide it.


(Benjamin Muschko) #2

Is there a way to suppress this warning in my build file?

At the moment you cannot suppress deprecation warnings. To be honest I feel that if we’d allow user to do that then everyone would simply turn them off and forget about them until the next release.

A newer version of the plugin isn’t yet available. Since the warning doesn’t specify that it’s coming from one of the plugins, it makes it seem like it’s a failure in our code.

I’d agree that the message can be somewhat bothersome especially if you have no control about it. The warning does specify the source but only if you run with -s.

I know people will start filing tickets about the warning…

I suggest making your voice hear. The higher an issue is voted the higher the possibility that we actually do something about it. Feel free to create a new issue if you think it doesn’t exist yet. Community contributions are highly welcome!