Severity (Gradle API 9.6.0)
Description: declaration: package: org.gradle.tooling.events.problems, interface: Severity

Package org.gradle.tooling.events.problems

# Interface Severity

@Incubating public interface Severity
Represents a problem severity.

Since:
  8.6

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Severity`
  `ADVICE`
  Advice-level severity.
  `static final Severity`
  `ERROR`
  Error-level severity.
  `static final Severity`
  `WARNING`
  Warning-level severity.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getSeverity()`
  The severity level represented by a string.
  `boolean`
  `isKnown()`
  Returns true if this severity is one of `ADVICE`, `WARNING`, or `ERROR`.

- ## Field Details

  - ### ADVICE

    static final Severity ADVICE
    Advice-level severity. Only emitted by Gradle versions < 9.6.
    Since:
      8.6

  - ### WARNING

    static final Severity WARNING
    Warning-level severity. Gradle versions < 9.6 allow explicitly setting severity to warning. Starting from 9.6, warning severity is auto-assigned to problems that won't fail the build.
    Since:
      8.6

  - ### ERROR

    static final Severity ERROR
    Error-level severity. Gradle versions < 9.6 allow explicitly setting severity to error. Starting from 9.6, error severity is auto-assigned to problems that will fail the build.
    Since:
      8.6

- ## Method Details

  - ### getSeverity

    int getSeverity()
    The severity level represented by a string.
    Returns:
      the severity
    Since:
      8.6

  - ### isKnown

    boolean isKnown()
    Returns true if this severity is one of `ADVICE`, `WARNING`, or `ERROR`.
    Returns:
      if this instance is a known severity
    Since:
      8.6