api / org.gradle.api.artifacts / DependencyArtifact

DependencyArtifact

interface DependencyArtifact

An Artifact represents an artifact included in a org.gradle.api.artifacts.Dependency.

An artifact is an (immutable) value object.

Properties

DEFAULT_TYPE

static val DEFAULT_TYPE: String

Functions

getClassifier

abstract fun getClassifier(): String

Returns the classifier of this artifact.

getExtension

abstract fun getExtension(): String

Returns the extension of this artifact. Often the extension is the same as the type, but sometimes this is not the case. For example for an ivy XML module descriptor, the type is ivy and the extension is xml.

getName

abstract fun getName(): String

Returns the name of this artifact.

getType

abstract fun getType(): String

Returns the type of this artifact. Often the type is the same as the extension, but sometimes this is not the case. For example for an ivy XML module descriptor, the type is ivy and the extension is xml.

getUrl

abstract fun getUrl(): String

Returns an URL under which this artifact can be retrieved. If not specified the user repositories are used for retrieving.

setClassifier

abstract fun setClassifier(classifier: String): Unit

Sets the classifier of this artifact.

setExtension

abstract fun setExtension(extension: String): Unit

Sets the extension of this artifact.

setName

abstract fun setName(name: String): Unit

Sets the name of this artifact.

setType

abstract fun setType(type: String): Unit

Sets the type of this artifact.

setUrl

abstract fun setUrl(url: String): Unit

Sets the URL for this artifact.