Closed Mahoney closed 4 years ago
@Mahoney are you willing to submit a PR to add this?
Possibly. Need to work out timings.
Interesting idea. We could adapt our extension to use the same api, though it will be a breaking change.
Just to note this same request came in on the detekt project, and it's something I've looked into previously. I'll copy the comment I made on the detekt issue:
I looked into this some time back, and it doesn't seem feasible - see https://github.com/gradle/gradle/issues/7063 for some of the background. The Checkstyle tasks can implement
Reporting
interface easily by taking advantage of implementations in Gradle's internal API, but since detekt is a third party plugin it can't do the same.Note also the first comment on that issue, written by one of the Gradle team, which says
The
Reporting
interface isn't really intended to be implemented outside of the Gradle core plugins.If you have any suggestions on how to implement that would be welcome, but otherwise I recommend closing as wontfix.
@3flex thanks for the feedback.
@Mahoney implementing this feature is blocked by the need for support in Gradle for this. If you'd like to see this feature implemented here, please consider contributing a PR to Gradle/Gradle that makes this API easier to implement for plugin authors. Sorry I don't have a better answer.
NP, makes sense
Added 'wontfix' until there is official support offered from Gradle. Once Gradle supports this for plugin authors, I'm happy to use it.
The Build Dashboard Plugin (and a plugin I'm writing to aggregate reports from subprojects) rely on a task implementing
org.gradle.api.reporting.Reporting
to recognise it as a task that generates reports.It would be nice if
KtlintCheckTask
could participate in this by implementingorg.gradle.api.reporting.Reporting
, allowing its outputs to be aggregated up as well.