Gradle

@ServiceScope(value = Build::class)
interface Gradle : PluginAware, ExtensionAware(source)

Represents an invocation of Gradle.

You can obtain a Gradle instance by calling getGradle.

Functions

Link copied to clipboard
abstract fun addBuildListener(buildListener: BuildListener)
Adds a BuildListener to this Build instance.
Link copied to clipboard
abstract fun addListener(listener: Any)
Adds the given listener to this build.
Link copied to clipboard
Adds a listener to this build, to receive notifications as projects are evaluated.
Link copied to clipboard
abstract fun afterProject(closure: Closure)
Adds a closure to be called immediately after a project is evaluated.
abstract fun afterProject(action: Action<in Project>)
Adds an action to be called immediately after a project is evaluated.
Link copied to clipboard
abstract fun allprojects(action: Action<in Project>)
Adds an action to execute against all projects of this build.
Link copied to clipboard
abstract fun apply(@DelegatesTo(value = ObjectConfigurationAction::class) closure: Closure)
abstract fun apply(action: Action<in ObjectConfigurationAction>)
Applies zero or more plugins or scripts.
abstract fun apply(options: Map<String, out Any>)
Applies a plugin or script, using the given options provided as a map.
Link copied to clipboard
abstract fun beforeProject(closure: Closure)
Adds a closure to be called immediately before a project is evaluated.
abstract fun beforeProject(action: Action<in Project>)
Adds an action to be called immediately before a project is evaluated.
Link copied to clipboard
abstract fun beforeSettings(@DelegatesTo(value = Settings::class) closure: Closure<out Any>)
abstract fun beforeSettings(action: Action<in Settings>)
Adds an action to be called before the build settings have been loaded and evaluated.
Link copied to clipboard
abstract fun buildFinished(closure: Closure)
Adds a closure to be called when the build is completed.
abstract fun buildFinished(action: Action<in BuildResult>)
Adds an action to be called when the build is completed.
Link copied to clipboard
abstract fun getBuildPath(): String
Get the path of this build relative to the root build.
Link copied to clipboard
The container of extensions.
Link copied to clipboard
abstract fun getGradle(): Gradle
Returns this Gradle instance.
Link copied to clipboard
@Nullable
abstract fun getGradleHomeDir(): @Nullable File
Returns the Gradle home directory, if any.
Link copied to clipboard
abstract fun getGradleUserHomeDir(): File
Returns the Gradle user home directory.
Link copied to clipboard
abstract fun getGradleVersion(): String
Returns the current Gradle version.
Link copied to clipboard
Returns the included builds for this build.
Link copied to clipboard
Gives access to the new Gradle build lifecycle callbacks.
Link copied to clipboard
@Nullable
abstract fun getParent(): @Nullable Gradle
Returns the parent build of this build, if any.
Link copied to clipboard
The plugin manager for this plugin aware object.
Link copied to clipboard
abstract fun getPlugins(): PluginContainer
The container of plugins that have been applied to this object.
Link copied to clipboard
Provides access to methods to create various kinds of org.gradle.api.provider.Provider instances.
Link copied to clipboard
abstract fun getRootProject(): Project
Returns the root project of this build.
Link copied to clipboard
Returns the build services that are shared by all projects of this build.
Link copied to clipboard
Returns the StartParameter used to start this build.
Link copied to clipboard
Returns the TaskExecutionGraph for this build.
Link copied to clipboard
abstract fun includedBuild(name: String): IncludedBuild
Returns the included build with the specified name for this build.
Link copied to clipboard
abstract fun projectsEvaluated(closure: Closure)
Adds a closure to be called when all projects for the build have been evaluated.
abstract fun projectsEvaluated(action: Action<in Gradle>)
Adds an action to be called when all projects for the build have been evaluated.
Link copied to clipboard
abstract fun projectsLoaded(closure: Closure)
Adds a closure to be called when the projects for the build have been created from the settings.
abstract fun projectsLoaded(action: Action<in Gradle>)
Adds an action to be called when the projects for the build have been created from the settings.
Link copied to clipboard
abstract fun removeListener(listener: Any)
Removes the given listener from this build.
Link copied to clipboard
Removes the given listener from this build.
Link copied to clipboard
abstract fun rootProject(action: Action<in Project>)
Adds an action to execute against the root project of this build.
Link copied to clipboard
abstract fun settingsEvaluated(closure: Closure)
Adds a closure to be called when the build settings have been loaded and evaluated.
abstract fun settingsEvaluated(action: Action<in Settings>)
Adds an action to be called when the build settings have been loaded and evaluated.
Link copied to clipboard
abstract fun useLogger(logger: Any)
Uses the given object as a logger.