Hello! Is there a way to get all deprecation warni...
# community-support
a
Hello! Is there a way to get all deprecation warnings after a Java compile in Gradle? Currently I am parsing the Gradle output to collect these, but I was wondering if there is a more structured way to do this.
e
JavaCompile should be reporting errors through the Problems API since Gradle 8.9. I'm not sure if warnings (such as deprecations) are, though; I haven't worked on a Java project in quite a while
ah https://github.com/gradle/gradle/issues/26529 indicates that they should be
v
Without tooling api it does not work though, does it?
a
That's unfortunate. Then it seems my current solution of parsing the javac output is the best I can do.
e
if you're just trying to collect deprecation warnings locally, then tooling API is feasible
it's not going to be as easy as parsing output though
v
Is it? Don't you need to drive the build over the tooling API to get that information? Can you get it from within the same build process?
e
yeah you need to drive the build from the tooling API
but doing the build from console and running grep over the output is also driving the build yourself
v
Yeah, true, if he parses the output then this is also outside Gradle.