api / org.gradle.api.publish.maven / MavenArtifactSet / artifact

artifact

abstract fun artifact(source: Any): MavenArtifact

Creates and adds a MavenArtifact to the set. The semantics of this method are the same as MavenPublication#artifact(Object).

Parameters

source - The source of the artifact content.

abstract fun artifact(source: Any, config: Action<in MavenArtifact>): MavenArtifact

Creates and adds a MavenArtifact to the set, which is configured by the associated action. The semantics of this method are the same as MavenPublication#artifact(Object, Action).

Parameters

source - The source of the artifact.

config - An action or closure to configure the values of the constructed MavenArtifact.