# Package-level declarations

The main interfaces and classes of the Gradle tooling API.

## Types

BuildAction
Link copied to clipboard
interface BuildAction<T> : Serializable
An action that executes against a Gradle build and produces a result of type `T`.
BuildActionExecuter
Link copied to clipboard
interface BuildActionExecuter<T> : ConfigurableLauncher<T>
Used to execute a BuildAction in the build process.
BuildActionFailureException
Link copied to clipboard
open class BuildActionFailureException : GradleConnectionException
Thrown when a BuildAction fails.
BuildCancelledException
Link copied to clipboard
open class BuildCancelledException : GradleConnectionException
Thrown when a org.gradle.tooling.LongRunningOperation is cancelled before the operation completes.
BuildController
Link copied to clipboard
interface BuildController
Provides a BuildAction various ways to control a Gradle build and access information about the build.
BuildException
Link copied to clipboard
open class BuildException : GradleConnectionException
Thrown when a Gradle build fails or when a model cannot be built.
BuildLauncher
Link copied to clipboard
interface BuildLauncher : ConfigurableLauncher<T>
A `BuildLauncher` allows you to configure and execute a Gradle build.
CancellationToken
Link copied to clipboard
interface CancellationToken
Token that propagates notification that an operation should be cancelled.
CancellationTokenSource
Link copied to clipboard
interface CancellationTokenSource
A `CancellationTokenSource` allows you to issue cancellation requests to one or more org.gradle.tooling.LongRunningOperation instances.
ConfigurableLauncher
Link copied to clipboard
interface ConfigurableLauncher<T : ConfigurableLauncher<T>?> : LongRunningOperation
A `ConfigurableLauncher` allows you to configure a long running operation.
Failure
Link copied to clipboard
interface Failure
Represents a failure.
FileComparisonTestAssertionFailure
Link copied to clipboard
@Incubating
interface FileComparisonTestAssertionFailure : TestAssertionFailure
Represent a test assertion failure where the test fails due to a broken assertion.
GradleConnectionException
Link copied to clipboard
open class GradleConnectionException : RuntimeException
Thrown when there is some problem using a Gradle connection.
GradleConnector
Link copied to clipboard
abstract class GradleConnector
A `GradleConnector` is the main entry point to the Gradle tooling API.
IntermediateResultHandler
Link copied to clipboard
interface IntermediateResultHandler<T>
A handler for an intermediate result obtained by a BuildActionExecuter.
ListenerFailedException
Link copied to clipboard
open class ListenerFailedException : GradleConnectionException
Thrown whenever a listener fails with an exception, which in general implies that the build completed like it should, but that one of the listeners failed with an exception.
LongRunningOperation
Link copied to clipboard
interface LongRunningOperation
Offers ways to communicate both ways with a Gradle operation, be it building a model or running tasks.
ModelBuilder
Link copied to clipboard
interface ModelBuilder<T> : ConfigurableLauncher<T>
A `ModelBuilder` allows you to fetch a snapshot of some model for a project or a build.
ProgressEvent
Link copied to clipboard
interface ProgressEvent
Some information about a piece of work of a long running operation.
ProgressListener
Link copied to clipboard
interface ProgressListener
A listener which is notified as some long running operation makes progress.
ProjectConnection
Link copied to clipboard
interface ProjectConnection : Closeable
Represents a long-lived connection to a Gradle project.
ResultHandler
Link copied to clipboard
interface ResultHandler<T>
A handler for an asynchronous operation which returns an object of type T.
StreamedValueListener
Link copied to clipboard
interface StreamedValueListener
Receives a value sent via send.
Supplier
Link copied to clipboard
@Incubating
interface Supplier<T>
A value supplier.
TestAssertionFailure
Link copied to clipboard
@Incubating
interface TestAssertionFailure : TestFailure
Represent a test assertion failure where the test fails due to a broken assertion.
TestExecutionException
Link copied to clipboard
open class TestExecutionException : GradleConnectionException
Thrown when the org.gradle.tooling.TestLauncher cannot run tests, or when one or more tests fail.
TestFailure
Link copied to clipboard
@Incubating
interface TestFailure : Failure
Describes a test failure, that can either be a test assertion failure or a test framework failure.
TestFrameworkFailure
Link copied to clipboard
@Incubating
interface TestFrameworkFailure : TestFailure
Describes an unexpected test failure, i.e.
TestLauncher
Link copied to clipboard
interface TestLauncher : ConfigurableLauncher<T>
A `TestLauncher` allows you to execute tests in a Gradle build.
TestSpec
Link copied to clipboard
@Incubating
interface TestSpec
Provides infrastructure to select which test classes, methods, and packages will be included in the test execution.
TestSpecs
Link copied to clipboard
@Incubating
interface TestSpecs
Provides test selection from a specific test task.
ToolingModelContract
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.TYPE])
@Incubating
annotation class ToolingModelContract
Annotation used to mark TAPI model interfaces.
UnknownModelException
Link copied to clipboard
open class UnknownModelException : UnsupportedVersionException
Thrown when the client is trying to acquire a model that is unknown to the Tooling API.
UnsupportedVersionException
Link copied to clipboard
open class UnsupportedVersionException : GradleConnectionException
Thrown when the target Gradle version does not support a particular feature.