gradle
8.6

# platform

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

Declares a dependency on a platform. If the target coordinates represent multiple potential components, the platform component will be selected, instead of the library.

#### Parameters

notation

the coordinates of the platform

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

Declares a dependency on a platform. If the target coordinates represent multiple potential components, the platform component will be selected, instead of the library.

#### Parameters

notation

the coordinates of the platform

configureAction

the dependency configuration block

open fun platform(dependencyProvider: Provider<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>(source)

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

#### Return

a new dependency provider targeting the platform variant of the component

#### Parameters

dependencyProvider

the dependency provider

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

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

#### Return

a new dependency provider targeting the platform variant of the component

#### Parameters

dependencyProviderConvertible

the dependency provider convertible that returns the dependency provider