BuildController

Provides a BuildAction various ways to control a Gradle build and access information about the build.

Since

1.8

Functions

Link copied to clipboard
abstract fun <M> fetch(modelType: Class<M>): FetchModelResult<M>
Fetches a snapshot of the model of the given type for the default project using resilient model fetching.
abstract fun <M> fetch(target: Model, modelType: Class<M>): FetchModelResult<M>
Fetches a snapshot of the model of the given type for the given element using resilient model fetching.
abstract fun <M, P> fetch(modelType: Class<M>, @Nullable parameterType: @Nullable Class<P>, @Nullable parameterInitializer: @Nullable Action<in P>): FetchModelResult<M>
Fetches a snapshot of the model of the given type using the given parameter using resilient model fetching.
abstract fun <M, P> fetch(@Nullable target: @Nullable Model, modelType: Class<M>, @Nullable parameterType: @Nullable Class<P>, @Nullable parameterInitializer: @Nullable Action<in P>): FetchModelResult<M>
Fetches a snapshot of the model of the given type for the given element using the given parameter with resilient model fetching.
Link copied to clipboard
@Nullable
abstract fun <T> findModel(modelType: Class<T>): @Nullable T
@Nullable
abstract fun <T> findModel(target: Model, modelType: Class<T>): @Nullable T
Fetches a snapshot of the model of the given type, if available.
@Nullable
abstract fun <T, P> findModel(modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): @Nullable T
Fetches a snapshot of the model of the given type using the given parameter, if available.
@Nullable
abstract fun <T, P> findModel(target: Model, modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): @Nullable T
Fetches a snapshot of the model of the given type for the given element using the given parameter, if available.
Link copied to clipboard
abstract fun getBuildModel(): GradleBuild
Returns an overview of the Gradle build, including some basic details of the projects that make up the build.
Link copied to clipboard
abstract fun getCanQueryProjectModelInParallel(modelType: Class<out Any>): Boolean
Returns true when actions run using run and that query project models of the given type will run in parallel.
Link copied to clipboard
abstract fun <T> getModel(modelType: Class<T>): T
Fetches a snapshot of the model of the given type for the default project.
abstract fun <T> getModel(target: Model, modelType: Class<T>): T
Fetches a snapshot of the model of the given type for the given element, usually a Gradle project.
abstract fun <T, P> getModel(modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): T
Fetches a snapshot of the model of the given type using the given parameter.
abstract fun <T, P> getModel(target: Model, modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): T
Fetches a snapshot of the model of the given type for the given element using the given parameter.
Link copied to clipboard
abstract fun <T> run(actions: Collection<out BuildAction<out T>>): List<T>
Runs the given actions and returns their results.
Link copied to clipboard
abstract fun send(value: Any)
Streams an object to the client application.