api / org.gradle.api.artifacts / PublishArtifact

PublishArtifact

interface PublishArtifact : Buildable

A PublishArtifact is an artifact produced by a project.

Functions

getClassifier

abstract fun getClassifier(): String

Returns the classifier of this published artifact, if any.

getDate

abstract fun getDate(): Date

Returns the date that should be used when publishing this artifact. This is used in the module descriptor accompanying this artifact (the ivy.xml). If the date is not specified, the current date is used. If this artifact is published without an module descriptor, this property has no relevance.

getExtension

abstract fun getExtension(): String

Returns the extension of this published 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.

getFile

abstract fun getFile(): File

Returns the file of this artifact.

getName

abstract fun getName(): String

Returns the name of the artifact.

getType

abstract fun getType(): String

Returns the type of the published 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.

Inherited Functions

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.

Inheritors

ConfigurablePublishArtifact

interface ConfigurablePublishArtifact : PublishArtifact

A PublishArtifact whose properties can be modified.