api / org.gradle.api / Action

Action

@HasImplicitReceiver interface Action<T : Any>

Performs some action against objects of type T.

Parameters

- The type of object which this action accepts.

Functions

execute

abstract fun execute(t: T): Unit

Performs this action against the given object.

Extension Functions

invoke

operator fun <T> Action<in T>.invoke(target: T): Unit

Enables function invocation syntax on Action references.

Inheritors

AttributeCompatibilityRule

interface AttributeCompatibilityRule<T : Any> : Action<CompatibilityCheckDetails<T>>

A rule that determines whether a given attribute value is compatible some provided attribute value.

AttributeDisambiguationRule

interface AttributeDisambiguationRule<T : Any> : Action<MultipleCandidatesDetails<T>>

A rule that selects the best value out of a set of two or more candidates.

ComponentMetadataRule

interface ComponentMetadataRule : Action<ComponentMetadataContext>

A rule that modify ComponentMetadataDetails.

ComponentMetadataSupplier

interface ComponentMetadataSupplier : Action<ComponentMetadataSupplierDetails>

A component metadata rule is responsible for providing the initial metadata of a component from a remote repository, in place of parsing the descriptor. Users may implement a provider to make dependency resolution faster.

ComponentMetadataVersionLister

interface ComponentMetadataVersionLister : Action<ComponentMetadataListerDetails>

Interface for custom version listers. A version lister is reponsible for returning the list of versions of a module which are available in a specific repository. For this, Gradle is going to call the lister once for each module it needs the list of versions. This will typically happen in case a dynamic version is requested, in which case we need to know the list of versions published for this module. It will not, however, be called for fixed version numbers.