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.

selectArtifact

abstract fun selectArtifact(type: String, @Nullable extension: @Nullable String, @Nullable classifier: @Nullable String)(source)

Adds an artifact to substitute. The first time this method is called, the original artifacts are replaced with the artifact defined by this method call. If you wish to add artifacts to the original query, you need to call getRequestedSelectors and add them using selectArtifact.

Since

6.6

Parameters

type

the type of the artifact being queried

extension

the extension, defaults to the type

classifier

the classifier, defaults to null (no classifier)


Adds an artifact to substitute. This method is a convenience to re-register artifacts requested by the original dependency. In most cases, the appropriate method to call is selectArtifact

Since

6.6