Filter javadoc messages/suppress javadoc error messages

Is it possible to suppress error messages from a javadoc task or filter the error messages from the javadoc task to prevent them from displaying when the task is being run?

I’ve written a doclet which runs on some source which misses some classes.

Only when running the javadoc task it prints those error messages “error: cannot find symbol” and it prints “x warnings” The missing classes are not an error/warning in this case so I would like not to see these messages. Is this possible using gradle by applying a regex filter on the (stdout/stderr/logging?) output of javadoc ?

Or is there a better way to suppress these errors/warnings ?