# BuildController

interface BuildController(source)

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

#### Since

1.8

## Functions

findModel
Link copied to clipboard
@Nullable
abstract fun <T> findModel(modelType: Class<T>): T
@Nullable
abstract fun <T> findModel(target: Model, modelType: Class<T>): 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>): 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>): T
Fetches a snapshot of the model of the given type for the given element using the given parameter, if available.
findModel
Link copied to clipboard
inline fun <T : Any> BuildController.findModel(modelType: KClass<T>): T?
inline fun <T : Any> BuildController.findModel(target: Model, modelType: KClass<T>): T?
inline fun <T : Any, P : Any> BuildController.findModel(modelType: KClass<T>, parameterType: KClass<P>, parameterInitializer: Action<in P>): T?
inline fun <T : Any, P : Any> BuildController.findModel(target: Model, modelType: KClass<T>, parameterType: KClass<P>, parameterInitializer: Action<in P>): T?

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.tooling.BuildController.findModel.

getBuildModel
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.
getCanQueryProjectModelInParallel
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.
getCanQueryProjectModelInParallel
Link copied to clipboard
inline fun BuildController.getCanQueryProjectModelInParallel(modelType: KClass<*>): Boolean

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.tooling.BuildController.getCanQueryProjectModelInParallel.

getModel
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.
getModel
Link copied to clipboard
inline fun <T : Any> BuildController.getModel(modelType: KClass<T>): T
inline fun <T : Any> BuildController.getModel(target: Model, modelType: KClass<T>): T
inline fun <T : Any, P : Any> BuildController.getModel(modelType: KClass<T>, parameterType: KClass<P>, parameterInitializer: Action<in P>): T
inline fun <T : Any, P : Any> BuildController.getModel(target: Model, modelType: KClass<T>, parameterType: KClass<P>, parameterInitializer: Action<in P>): T

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.tooling.BuildController.getModel.

run
Link copied to clipboard
abstract fun <T> run(actions: Collection<out BuildAction<out T>>): List<T>
Runs the given actions and returns their results.
send
Link copied to clipboard
abstract fun send(value: Any)
Streams an object to the client application.