api / org.gradle.api.artifacts / ConfigurablePublishArtifact

ConfigurablePublishArtifact

interface ConfigurablePublishArtifact : PublishArtifact

A PublishArtifact whose properties can be modified.

Functions

builtBy

abstract fun builtBy(vararg tasks: Any): ConfigurablePublishArtifact

Registers some tasks which build this artifact.

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.

Inherited 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.