Adam
09/24/2026, 9:51 AMVampire
09/24/2026, 11:17 AMVampire
09/24/2026, 11:17 AMinterface ProblemsProvider {
@get:Inject
val problems: Problems
}
tasks.register("foo") {
val problemReporter = objects.newInstance<ProblemsProvider>().problems.reporter
doLast {
problemReporter.report(
ProblemId.create(
"foo",
"Foo",
ProblemGroup.create("bar", "Bar")
)
) {
solution("Do something")
}
}
}
=>
> Task :foo
Problem found: Foo (id: bar:foo)
Possible solution: Do something.
[Incubating] Problems report is available at: file:///.../showcase/build/reports/problems/problems-report.htmlVampire
09/24/2026, 11:21 AMorg.gradle.warning.mode=all.
With fail, summary, or none it is not printed to console but only rendered in the problems report.Vampire
09/24/2026, 11:23 AMproblemReporter.report then it is just a warning and thus only displayed if a user decides to display warnings.
If you use problemReporter.throwing it is an error that also will fail the build and is always displayed.Vampire
09/24/2026, 11:25 AMif to render to console manually additionally if Gradle version is below 9.3.0.Vampire
09/24/2026, 11:27 AMlogger.warn so that at least -q can suppress the warning.
If you render it unconditionally in 9.3+, then users that enabled warning display will get the warning twice.