Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
chore: merge upstream branch gradle/master into main
Browse files Browse the repository at this point in the history
This commit synchronizes the latest 2 changes from the https://github.com/gradle/gradle/tree/master. The changes include:

4140757: gradle/gradle#27243 Add javadocs and since-annotation to Problems API members
0991425: Add missing javadocs and since-annotation to Problems API members
  • Loading branch information
meowool-bot committed Dec 1, 2023
2 parents e5a746a + 4140757 commit ce26b19
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public interface BasicProblemBuilder extends ProblemBuilder {
* Creates the new problem. Calling {@link #build()} won't report the problem via build operations, it can be done separately by calling {@link ReportableProblem#report()}.
*
* @return the new problem
* @since 8.6
*/
Problem build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public interface ReportableProblemBuilder extends BasicProblemBuilder {
* Creates the new problem. Calling {@link #build()} won't report the problem via build operations, it can be done separately by calling {@link ReportableProblem#report()}.
*
* @return the new problem
* @since 8.6
*/
ReportableProblem build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@
* Additional data attached to the problem.
* <p>
* The only supported value type is {@link String}.
*
* @since 8.6
*/
@Incubating
@NonNullApi
public interface AdditionalData {

/**
* Returns additional data as a map.
*
* @since 8.6
*/
Map<String, Object> getAsMap();
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface Details {
* Returns a detailed description of a problem.
*
* @return the problem details
* @since 8.6
*/
@Nullable
String getDetails();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
@Incubating
public interface DocumentationLink {

/**
* Documentation link as a URL.
*
* @since 8.6
*/
@Nullable
String getUrl();
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
@Incubating
public interface ExceptionContainer {

/**
* Exception that caused the problem.
*
* @since 8.6
*/
@Nullable
RuntimeException getException();
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,34 @@
@Incubating
public interface FileLocation extends Location {

/**
* File path.
*
* @since 8.6
*/
String getPath();

/**
* An index of the line in the file, if available.
*
* @since 8.6
*/
@Nullable
Integer getLine();

/**
* An index of the column in the file, if available.
*
* @since 8.6
*/
@Nullable
Integer getColumn();

/**
* The length of the region in the file, if available.
*
* @since 8.6
*/
@Nullable
Integer getLength();
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public interface Label {
* Returns the brief description of a problem.
*
* @return the label
* @since 8.6
*/
String getLabel();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@
@Incubating
public interface PluginIdLocation extends Location {

/**
* The ID of the plugin to which the location belongs.
*
* @since 8.6
*/
String getPluginId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ public interface ProblemCategory {
* Returns the namespace. Describes the component reporting the problem (Gradle core or plugin ID).
*
* @return the problem's namespace.
* @since 8.6
*/
String getNamespace();

/**
* The main problem category.
*
* @return The category string.
* @since 8.6
*/
String getCategory();

/**
* The problem's subcategories.
*
* @return the subcategories.
* @since 8.6
*/
List<String> getSubCategories();
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,40 @@
public interface Severity {

// Note: the static fields must be in sync with entries from org.gradle.api.problems.Severity.
/**
* Advice-level severity.
*
* @since 8.6
*/
Severity ADVICE = new DefaultSeverity(0, true);

/**
* Warning-level severity.
*
* @since 8.6
*/
Severity WARNING = new DefaultSeverity(1, true);

/**
* Error-level severity.
*
* @since 8.6
*/
Severity ERROR = new DefaultSeverity(2, true);

/**
* The severity level represented by a string.
*
* @return the severity
* @since 8.6
*/
int getSeverity();

/**
* returns true if this severity is one of {@link #ADVICE}, {@link #WARNING}, or {@link #ERROR}.
* Returns true if this severity is one of {@link #ADVICE}, {@link #WARNING}, or {@link #ERROR}.
*
* @return if this instance is a known severity
* @since 8.6
*/
boolean isKnown();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
*/
@Incubating
public interface Solution {

/**
* A description of a possible solution the user can try to fix the problem.
*
* @since 8.6
*/
String getSolution();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
*/
@Incubating
public interface TaskPathLocation extends Location {

/**
* Returns the path of this task within the build tree. This is a unique name for this task within the composite build.
*
* @since 8.6
*/
String getIdentityPath();
}

0 comments on commit ce26b19

Please sign in to comment.