Receive Problems API event at Gradle Plugin

I’m trying to add annotation with Github actions workflow.

It looks recent Gradle provides Problems API to describe errors to IDEs.
And I found sample code in here.

In sample, Problem event can be receive from Gradle Tooling API which is used on IDE.
But is it possible to receive these events in Gradle itself?

If it is possible, it might be very easy to implement Present summary of errors and warnings reported via Problems API · Issue #30 · gradle/actions · GitHub

I’m not 100% sure, but I don’t think so

Currently there’s no public API for consuming problems. Problem reports are emitted via build operation progress events. You could register a new listener via the BuildOperationListenerManager service, but it’s internal API and I’d suggest not to use it.

The Problems API maturation is on our roadmap and as part of it, we’ll consider a consumer API in Gradle.

2 Likes

Issue was opened.