gradle
8.6

# add

abstract fun add(configurationName: String, artifactNotation: Any): PublishArtifact(source)

Adds an artifact to the given configuration.

#### Return

The artifact.

#### Parameters

configurationName

The name of the configuration.

artifactNotation

The artifact notation, in one of the notations described above.

abstract fun add(configurationName: String, artifactNotation: Any, @DelegatesTo(value = ConfigurablePublishArtifact::class) configureClosure: Closure): PublishArtifact(source)

Adds an artifact to the given configuration.

#### Return

The artifact.

#### Parameters

configurationName

The name of the configuration.

artifactNotation

The artifact notation, in one of the notations described above.

configureClosure

The closure to execute to configure the artifact.

abstract fun add(configurationName: String, artifactNotation: Any, configureAction: Action<out Any>): PublishArtifact(source)

Adds an artifact to the given configuration.

#### Return

The artifact.

#### Parameters

configurationName

The name of the configuration.

artifactNotation

The artifact notation, in one of the notations described above.

configureAction

The action to execute to configure the artifact.