Class RootProblemGroup

java.lang.Object
org.gradle.api.problems.ProblemGroup
org.gradle.api.problems.RootProblemGroup
Direct Known Subclasses:
CompilationProblemGroup, DeliveryProblemGroup, DependenciesProblemGroup, DocumentationProblemGroup, ExternalProcessesProblemGroup, OthersProblemGroup, PackagingProblemGroup, ProvisioningProblemGroup, TransformationProblemGroup, VerificationProblemGroup

@Incubating public abstract class RootProblemGroup extends ProblemGroup
A root problem group of the predefined hierarchy, for example Compilation.

Root groups only structure the hierarchy: problems cannot be reported directly into a root group. Report them into one of the predefined sub-groups, into a sub-group created with group(String), or into getUndefined().

Not intended for subclassing outside of Gradle. New members may be added in future versions.

Since:
9.9.0
See Also:
  • Constructor Details

    • RootProblemGroup

      protected RootProblemGroup()
      Constructor.
      Since:
      9.9.0
  • Method Details

    • group

      public abstract SecondLevelProblemGroup group(String name)
      Returns the sub-group with the given name, creating it if it is not one of the predefined sub-groups.

      Names are case-sensitive. If name equals the name of a predefined sub-group, that predefined group is returned; any other name, including one that only differs from a predefined sub-group by case, creates a new sub-group. The name Undefined is reserved in any letter case; use getUndefined() instead.

      Group names should be short and noun-based, so they read well as categories in a report. They consist of letters and digits of any script, single spaces between words, and the characters - _ . + / & ' #, start with a letter or a digit, must be in Unicode normalization form NFC, and are limited to 50 characters.

      Parameters:
      name - the name of the sub-group
      Returns:
      the sub-group
      Throws:
      IllegalArgumentException - if the name is invalid or reserved
      Since:
      9.9.0
    • getUndefined

      public abstract UndefinedProblemGroup getUndefined()
      The synthetic Undefined sub-group for problems without an explicitly defined sub-group below this root group.

      Prefer a predefined sub-group or a sub-group created with group(String). This group exists so that a problem can be reported without inventing a category.

      Since:
      9.9.0