For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

artifact

abstract fun artifact(notation: Any)(source)

Adds an artifact to this variant.

See org.gradle.api.artifacts.dsl.ArtifactHandler for details of the supported notations.

Since

3.3


abstract fun artifact(notation: Any, configureAction: Action<in ConfigurablePublishArtifact>)(source)

Adds an artifact to this variant, configuring it using the given action.

See org.gradle.api.artifacts.dsl.ArtifactHandler for details of the supported notations.

Since

3.3