# copy

abstract fun copy(): Configuration(source)

Creates a copy of this configuration that only contains the dependencies directly in this configuration (without contributions 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

#### Since

0.7

abstract fun copy(dependencySpec: Spec<in Dependency>): Configuration(source)

Creates a copy of this configuration ignoring superconfigurations (see copy but filtering the dependencies using the specified dependency spec.

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

#### Since

0.7

#### Parameters

dependencySpec

filtering requirements

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

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

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

#### Since

0.7

#### Parameters

dependencySpec

filtering requirements