gradle
8.4

# copyRecursive

abstract fun copyRecursive(): Configuration(source)

Creates a copy of this configuration that contains the dependencies directly in this configuration and those derived from superconfigurations. The new configuration will be in the UNRESOLVED state, but will retain all other attributes of this configuration except superconfigurations. getHierarchy for the copy will not include any superconfigurations.

This method is only intended for use for specific situations involving resolvable configuration, it is NOT intended as a general-purpose copying mechanism.

#### Return

copy of this configuration

abstract fun copyRecursive(dependencySpec: Spec<out Any>): Configuration(source)

Creates a copy of this configuration with dependencies from superconfigurations (see copyRecursive) but filtering the dependencies using the dependencySpec.

This method is only intended for use for specific situations involving resolvable configuration, it is NOT intended as a general-purpose copying mechanism.

#### Return

copy of this configuration

#### Parameters

dependencySpec

filtering requirements

abstract fun copyRecursive(dependencySpec: Closure): Configuration(source)

Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as copyRecursive

This method is only intended for use for specific situations involving resolvable configuration, it is NOT intended as a general-purpose copying mechanism.

#### Return

copy of this configuration

#### Parameters

dependencySpec

filtering requirements