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
@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.
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.

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

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

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
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.

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 <T> send(value: T)
Streams an object to the client application.