api / org.gradle.tooling.model

Package org.gradle.tooling.model

Types

BuildIdentifier

interface BuildIdentifier : Model

Identifies a Gradle build.

A Gradle Build is a collection of one or more projects.

BuildModel

interface BuildModel

Represents a model that is associated with or represents some Gradle build.

BuildableElement

interface BuildableElement : Element

Represents an element which has Gradle tasks associated with it.

Dependency

interface Dependency

Represents an artifact dependency.

DomainObjectSet

interface DomainObjectSet<T : Any> : MutableSet<T>

A set of domain objects of type T.

Element

interface Element : Model

Described model element.

ExternalDependency

interface ExternalDependency : Dependency

Represents an external artifact dependency.

GradleModuleVersion

interface GradleModuleVersion

Informs about a module version, i.e. group, name, version.

GradleProject

interface GradleProject : HierarchicalElement, BuildableElement, ProjectModel

Represents a Gradle project.

GradleTask

interface GradleTask : Task

Represents a task which is executable by Gradle.

HasGradleProject

interface HasGradleProject : ProjectModel

An element that is associated with a Gradle project. Via the Gradle project you can access (list, run, etc.) Gradle tasks.

HierarchicalElement

interface HierarchicalElement : Element

Represents an element which belongs to some hierarchy.

Launchable

interface Launchable : ProjectModel

Represents an object that can be used to launch a Gradle build, such as a task.

To launch a build, you pass one or more org.gradle.tooling.model.Launchable instances to either org.gradle.tooling.BuildLauncher#forTasks(Iterable) or org.gradle.tooling.BuildLauncher#forLaunchables(Iterable).

Model

interface Model

A model that is buildable by the Tooling API. Models contain various information regarding the build. Models are typically tailored to a specific domain, for example build environment or IDE.

ProjectDependency

interface ProjectDependency : Dependency

Represents a dependency on another project.

ProjectIdentifier

interface ProjectIdentifier : Model

Identifies a Gradle project.

A Gradle Project is a project in a multi-project Gradle build or a single "standalone" project.

ProjectModel

interface ProjectModel

Represents a model that is associated with some Gradle project.

SourceDirectory

interface SourceDirectory

Represents a source directory.

Task

interface Task : Launchable

Represents a task which is executable by Gradle.

Note: Task extends Launchable since 1.12.

TaskSelector

interface TaskSelector : Launchable

Represents a Launchable that uses task name to select tasks executed from a given project and its sub-projects. This is roughly equivalent to running `gradle <task-name>` from the command-line.

Exceptions

UnsupportedMethodException

open class UnsupportedMethodException : UnsupportedOperationException

Thrown when the tooling API client attempts to use a method that does not exist in the version of Gradle that the tooling API is connected to.

Typically, to resolve such a problem you change/upgrade the target version of Gradle that the tooling API is connected to. Alternatively, you can handle and ignore this exception.