gradle
8.5

# dependencyScope

@Incubating
abstract fun dependencyScope(name: String): NamedDomainObjectProvider<DependencyScopeConfiguration>(source)

Registers a new DependencyScopeConfiguration with an immutable role. Dependency scope configurations collect dependencies, dependency constraints, and exclude rules to be used by both resolvable and consumable configurations.

#### Return

A provider which creates a new dependency scope configuration.

#### Parameters

name

The name of the configuration to register.

#### Throws

InvalidUserDataException

If a configuration with the given `name` already exists in this container.

@Incubating
abstract fun dependencyScope(name: String, action: Action<out Any>): NamedDomainObjectProvider<DependencyScopeConfiguration>(source)

Registers a DependencyScopeConfiguration via dependencyScope and then configures it with the provided action.

#### Return

A provider which creates a new dependency scope configuration.

#### Parameters

name

The name of the configuration to register.

action

The action to apply to the configuration.

#### Throws

InvalidUserDataException

If a configuration with the given `name` already exists in this container.