@Incubating public interface BuildController
BuildAction various ways to control a Gradle build and access information about the build.| Modifier and Type | Method and Description |
|---|---|
<T> T |
findModel(Class<T> modelType)
Fetches a snapshot of the model of the given type, if available.
|
<T> T |
findModel(Model target,
Class<T> modelType)
Fetches a snapshot of the model of the given type, if available.
|
GradleBuild |
getBuildModel()
Returns an overview of the Gradle build, including some basic details of the projects that make up the build.
|
<T> T |
getModel(Class<T> modelType)
Fetches a snapshot of the model of the given type for the default project.
|
<T> T |
getModel(Model target,
Class<T> modelType)
Fetches a snapshot of the model of the given type for the given element, usually a Gradle project.
|
<T> T getModel(Class<T> modelType) throws UnknownModelException
ProjectConnection is created.
Any of following models types may be available, depending on the version of Gradle being used by the target build:
GradleBuildBuildEnvironmentGradleProjectBuildInvocationsProjectPublicationsIdeaProjectBasicIdeaProjectEclipseProjectHierarchicalEclipseProjectA build may also expose additional custom tooling models. You can use this method to query these models.
T - The model type.modelType - The model type.UnknownModelException - When the default project does not support the requested model.@Nullable <T> T findModel(Class<T> modelType)
See getModel(Class) for more details.
T - The model type.modelType - The model type.GradleBuild getBuildModel()
#getModel(GradleBuild.class).<T> T getModel(Model target, Class<T> modelType) throws UnknownModelException
The following elements are supported:
BasicGradleProjectGradleProjectEclipseProjectIdeaModuleSee getModel(Class) for more details.
T - The model type.target - The target element, usually a project.modelType - The model type.UnknownModelException - When the target project does not support the requested model.@Nullable <T> T findModel(Model target, Class<T> modelType)
See getModel(Model, Class) for more details.
T - The model type.modelType - The model type.