Class ProblemGroup
java.lang.Object
org.gradle.api.problems.ProblemGroup
- Direct Known Subclasses:
GradleProblemGroup, GradleSecondLevelProblemGroup, RootProblemGroup, SecondLevelProblemGroup, ThirdLevelProblemGroup, UndefinedProblemGroup
Represents a group of problems.
Groups are organized in hierarchy where the parent group should represent the more broad problem group.
Two problem groups are considered equal if their getName() and their parents are equal.
Gradle provides a predefined hierarchy of groups, see ProblemGroups.
- Since:
- 8.8
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Subclassing ProblemGroup outside of Gradle is deprecated and will not be supported in Gradle 10. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProblemGroupDeprecated.Use the predefined groups fromProblems.getGroups()instead.static ProblemGroupcreate(String name, String displayName, @Nullable ProblemGroup parent) Deprecated.Use the predefined groups fromProblems.getGroups()instead, and create sub-groups withRootProblemGroup.group(String)orSecondLevelProblemGroup.group(String).abstract StringDeprecated.UsegetName()instead.abstract StringgetName()The name of the problem group.abstract @Nullable ProblemGroupDeprecated.The groups fromProblems.getGroups()have a fixed place in the predefined hierarchy, so there is no need to walk it.
-
Constructor Details
-
ProblemGroup
Deprecated.Subclassing ProblemGroup outside of Gradle is deprecated and will not be supported in Gradle 10. Use the groups fromProblems.getGroups()instead.Constructor.- Since:
- 8.13
-
-
Method Details
-
getName
-
getDisplayName
Deprecated.UsegetName()instead. The display name of a group fromProblems.getGroups()is its name. This method will be removed in Gradle 10.Returns a human-readable label describing the group.- Since:
- 8.8
-
getParent
Deprecated.The groups fromProblems.getGroups()have a fixed place in the predefined hierarchy, so there is no need to walk it. This method will be removed in Gradle 10 without replacement.Returns the parent group ornullfor root groups.- Since:
- 8.8
-
create
Deprecated.Use the predefined groups fromProblems.getGroups()instead. For problems that fit no predefined root group, create a sub-group withgetGroups().getOthers().group(name), seeRootProblemGroup.group(String). This method will be removed in Gradle 11.Creates a new root problem group i.e. a group with no parent.- Parameters:
name- the name of the group. Cannot be blank (i.e.,null, empty string, or only whitespaces).displayName- the user-friendly display name of the group. Cannot be blank (i.e.,null, empty string, or only whitespaces).- Returns:
- the new group
- Since:
- 8.13
-
create
@Deprecated public static ProblemGroup create(String name, String displayName, @Nullable ProblemGroup parent) Deprecated.Use the predefined groups fromProblems.getGroups()instead, and create sub-groups withRootProblemGroup.group(String)orSecondLevelProblemGroup.group(String). This method will be removed in Gradle 11.Creates a new problem group.- Parameters:
name- the name of the group. Cannot be blank (i.e.,null, empty string, or only whitespaces).displayName- the user-friendly display name of the group. Cannot be blank (i.e.,null, empty string, or only whitespaces).parent- the parent group. May benullfor root groups.- Returns:
- the new group
- Since:
- 8.13
-