gradle
8.3

# withArtifacts

abstract fun withArtifacts(componentType: Class<out Component>, artifactTypes: Array<Class<out Artifact>>): ArtifactResolutionQuery
abstract fun withArtifacts(componentType: Class<out Component>, artifactTypes: Collection<Class<out Artifact>>): ArtifactResolutionQuery

Defines the type of component that is expected in the result, and the artifacts to retrieve for components of this type. Presently, only a single component type and set of artifacts is permitted.

#### Parameters

componentType

The expected type of the component.

artifactTypes

The artifacts to retrieve for the queried components.