The stack trace of the deprecation is created at the point where the nagUser
method is called (i.e. the “something” that is deprecated is called) and the deepest stack trace element that has a Gradle build fileName
is printed, if any.
It’s not important which kind of deprecation it is, they all work the same.
So if you apply a plugin which adds a task to your project, two things can happen:
- applying the plugin generates the warning
- executing a task of the plugin generates the warning
The first case would print the location of the apply plugin
in your Gradle file.
The second case would only print a location if such a location in a Gradle file exists. Otherwise you’d have to use the -s/-S switch to get the full stack trace and search the cause of the warning manually because there is no good heuristic to find the “correct” element.
See DeprecationHandlingIntegrationTest for some examples.