gradle
8.4

# ProblemBuilderSpec

@Incubating
interface ProblemBuilderSpec(source)

A function that can be used to specify a Problem using a ProblemBuilder.

Usage example:

    throw getProblemService().throwing(builder ->
           builder.label(message)
               .undocumented()
               .noLocation()
               .type("task_selection")
               .group(ProblemGroup.GENERIC_ID)
               .details("long message")
               .severity(Severity.ERROR)
               .withException(new TaskSelectionException(message)));

Content copied to clipboard
Using this instead of an org.gradle.api.Action forces the user to specify all required properties of a Problem.

## Functions

apply
Link copied to clipboard
abstract fun apply(builder: ProblemBuilderDefiningLabel): ProblemBuilder