api / org.gradle.api.artifacts / SelfResolvingDependency

SelfResolvingDependency

interface SelfResolvingDependency : Dependency, Buildable

A SelfResolvingDependency is a Dependency which is able to resolve itself, independent of a repository.

Inherited Properties

ARCHIVES_CONFIGURATION

static val ARCHIVES_CONFIGURATION: String

CLASSIFIER

static val CLASSIFIER: String

DEFAULT_CONFIGURATION

static val DEFAULT_CONFIGURATION: String

Functions

resolve

abstract fun resolve(): MutableSet<File>

Resolves this dependency. A org.gradle.api.artifacts.ProjectDependency is resolved with transitive equals true by this method.

abstract fun resolve(transitive: Boolean): MutableSet<File>

Resolves this dependency by specifying the transitive mode. This mode has only an effect if the self resolved dependency is of type org.gradle.api.artifacts.ProjectDependency. In this case, if transitive is false, only the self resolving dependencies of the project configuration which are no project dependencies are resolved. If transitive is set to true, other project dependencies belonging to the configuration of the resolved project dependency are resolved recursively.

Inherited Functions

because

abstract fun because(reason: String): Unit

Sets the reason why this dependency should be used.

contentEquals

abstract fun contentEquals(dependency: Dependency): Boolean

Returns whether two dependencies have identical values for their properties. A dependency is an entity with a key. Therefore dependencies might be equal and yet have different properties.

copy

abstract fun copy(): Dependency

Creates and returns a new dependency with the property values of this one.

getBuildDependencies

abstract fun getBuildDependencies(): TaskDependency

Returns a dependency which contains the tasks which build this artifact. All Buildable implementations must ensure that the returned dependency object is live, so that it tracks changes to the dependencies of this buildable.

getGroup

abstract fun getGroup(): String

Returns the group of this dependency. The group is often required to find the artifacts of a dependency in a repository. For example, the group name corresponds to a directory name in a Maven like repository. Might return null.

getName

abstract fun getName(): String

Returns the name of this dependency. The name is almost always required to find the artifacts of a dependency in a repository. Never returns null.

getReason

abstract fun getReason(): String

Returns a reason why this dependency should be used, in particular with regards to its version. The dependency report will use it to explain why a specific dependency was selected, or why a specific dependency version was used.

getVersion

abstract fun getVersion(): String

Returns the version of this dependency. The version is often required to find the artifacts of a dependency in a repository. For example the version name corresponds to a directory name in a Maven like repository. Might return null.

Inheritors

FileCollectionDependency

interface FileCollectionDependency : SelfResolvingDependency

A FileCollectionDependency is a Dependency on a collection of local files which are not stored in a repository.

ProjectDependency

interface ProjectDependency : ModuleDependency, SelfResolvingDependency

A ProjectDependency is a Dependency on another project in the current project hierarchy.