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.

getArtifacts

abstract fun getArtifacts(type: Class<out Artifact>): Set<ArtifactResult>(source)

Returns the artifacts of the specified type that belong to this component. Includes resolved and unresolved artifacts (if any).

The elements of the returned collection are declared as ArtifactResult, however the artifact instances will also implement one of the following instances:

Return

the artifacts of this component with the specified type, or an empty set if no artifacts of the type exist.

Since

2.0