gradle
8.5

# enforcedPlatform

abstract fun enforcedPlatform(notation: Any): Dependency(source)

Declares a dependency on an enforced platform. If the target coordinates represent multiple potential components, the platform component will be selected, instead of the library. An enforced platform is a platform for which the direct dependencies are forced, meaning that they would override any other version found in the graph.

#### Parameters

notation

the coordinates of the platform

abstract fun enforcedPlatform(notation: Any, configureAction: Action<out Any>): Dependency(source)

Declares a dependency on an enforced platform. If the target coordinates represent multiple potential components, the platform component will be selected, instead of the library. An enforced platform is a platform for which the direct dependencies are forced, meaning that they would override any other version found in the graph.

#### Parameters

notation

the coordinates of the platform

configureAction

the dependency configuration block

abstract fun enforcedPlatform(dependencyProvider: Provider<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>(source)

Configures this dependency provider to select the enforced-platform variant of the target component

#### Return

a new dependency provider targeting the enforced-platform variant of the component

#### Parameters

dependencyProvider

the dependency provider

open fun enforcedPlatform(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>(source)

Configures this dependency provider to select the enforced-platform variant of the target component

#### Return

a new dependency provider targeting the enforced-platform variant of the component

#### Parameters

dependencyProviderConvertible

the dependency provider convertible that returns the dependency provider