# Class BuildResult

java.lang.Object
org.gradle.BuildResult

public class BuildResult extends Object

A `BuildResult` packages up the result of a build.

Since:
  0.7

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BuildResult(String action, @Nullable Gradle gradle, @Nullable Throwable failure)`
  Creates a new `BuildResult`.
  `BuildResult(@Nullable Gradle gradle, @Nullable Throwable failure)`
  Creates a new `BuildResult`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getAction()`
  The action performed by this build.
  `@Nullable Throwable`
  `getFailure()`
  Returns the failure.
  `@Nullable Gradle`
  `getGradle()`
  Returns the gradle.
  `BuildResult`
  `rethrowFailure()`
  Rethrows the build failure.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BuildResult

    public BuildResult(@Nullable Gradle gradle, @Nullable Throwable failure)
    Creates a new `BuildResult`.
    Since:
      0.8

  - ### BuildResult

    public BuildResult(String action, @Nullable Gradle gradle, @Nullable Throwable failure)
    Creates a new `BuildResult`.
    Since:
      2.14

- ## Method Details

  - ### getGradle

    public @Nullable Gradle getGradle()
    Returns the gradle.
    Since:
      0.8

  - ### getFailure

    public @Nullable Throwable getFailure()
    Returns the failure.
    Since:
      0.7

  - ### getAction

    public String getAction()
    The action performed by this build. Either `Build` or `Configure`.
    Since:
      2.14

  - ### rethrowFailure

    public BuildResult rethrowFailure()

    Rethrows the build failure. Does nothing if there was no build failure.

    Since:
      0.7