Package org.gradle.api.problems
Interface ProblemSpec
Provides options to configure problems.
- Since:
- 8.6
- See Also:
- 
Method SummaryModifier and TypeMethodDescription<T extends AdditionalData>
 ProblemSpecadditionalData(Class<T> type, Action<? super T> config) Declares additional data attached to the problem.contextualLabel(String contextualLabel) Declares a short, but context-dependent message for this problem.Declares a long description detailing the problem.documentedAt(String url) Declares where this problem is documented.fileLocation(String path) Declares that this problem is in a file.lineInFileLocation(String path, int line) Declares that this problem is in a file on a line.lineInFileLocation(String path, int line, int column) Declares that this problem is in a file with on a line at a certain position.lineInFileLocation(String path, int line, int column, int length) Declares that this problem is in a file with on a line at a certain position.offsetInFileLocation(String path, int offset, int length) Declares that this problem is in a file at a certain global position with a given length.Declares the severity of the problem.Declares solutions and advice that contain context-sensitive data, e.g.Declares that this problem is at the same place where it's reported.Declares the exception causing this problem.
- 
Method Details- 
contextualLabelDeclares a short, but context-dependent message for this problem.- Parameters:
- contextualLabel- the short message
- Returns:
- this
- Since:
- 8.8
 
- 
documentedAtDeclares where this problem is documented.- Returns:
- this
- Since:
- 8.6
 
- 
fileLocationDeclares that this problem is in a file.- Parameters:
- path- the file location
- Returns:
- this
- Since:
- 8.6
 
- 
lineInFileLocationDeclares that this problem is in a file on a line.- Parameters:
- path- the file location
- line- the one-indexed line number
- Returns:
- this
- Since:
- 8.6
 
- 
lineInFileLocationDeclares that this problem is in a file with on a line at a certain position.- Parameters:
- path- the file location
- line- the one-indexed line number
- column- the one-indexed column
- Returns:
- this
- Since:
- 8.6
 
- 
lineInFileLocationDeclares that this problem is in a file with on a line at a certain position.- Parameters:
- path- the file location
- line- the one-indexed line number
- column- the one-indexed column
- length- the length of the text
- Returns:
- this
- Since:
- 8.6
 
- 
offsetInFileLocationDeclares that this problem is in a file at a certain global position with a given length.- Parameters:
- path- the file location
- offset- the zero-indexed global offset from the beginning of the file
- length- the length of the text
- Returns:
- this
- Since:
- 8.6
 
- 
stackLocationProblemSpec stackLocation()Declares that this problem is at the same place where it's reported. The stack trace will be used to determine the location.- Returns:
- this
- Since:
- 8.6
 
- 
detailsDeclares a long description detailing the problem.Details can elaborate on the problem, and provide more information about the problem. They can be multiple lines long, but should not detail solutions; for that, use solution(String).- Parameters:
- details- the details
- Returns:
- this
- Since:
- 8.6
 
- 
solutionDeclares solutions and advice that contain context-sensitive data, e.g. the message contains references to variables, locations, etc.- Parameters:
- solution- the solution.
- Returns:
- this
- Since:
- 8.6
 
- 
additionalDataDeclares additional data attached to the problem.- Parameters:
- type- The type of the additional data. This can be any type that implements- AdditionalDataincluding- abstractclasses and interfaces. This type will be instantiated and provided as an argument for the- Actionpassed as the second argument.- The type can have the following properties: - getters and setters for collections, simple types and other types that itself follow these restrictions
- Provider API types
 
- config- The configuration action for the additional data.
- Returns:
- this
- Since:
- 8.13
 
- 
withExceptionDeclares the exception causing this problem.- Parameters:
- t- the exception.
- Returns:
- this
- Since:
- 8.11
 
- 
severityDeclares the severity of the problem.- Parameters:
- severity- the severity
- Returns:
- this
- Since:
- 8.6
 
 
-