# force

abstract fun force(notations: Array<Any>): ResolutionStrategy(source)

Allows forcing certain versions of dependencies, including transitive dependencies. Appends new forced modules to be considered when resolving dependencies.

It accepts the following notations:

- String in a format of: 'group:name:version', for example: 'org.gradle:gradle-core:1.0'
- Map with keys 'group', 'name' and 'version'; for example: [group: 'org.gradle', name: 'gradle-core', version: '1.0']
- Provider and ProviderConvertible of MinimalExternalModuleDependency
- instance of ExternalDependency
- instance of ModuleComponentSelector
- instance of ModuleVersionSelector (deprecated)
- any collection or array of above will be automatically flattened

Example:

    plugins {
        id 'java' // so that there are some configurations
    }

    configurations.all {
      resolutionStrategy.force 'asm:asm-all:3.3.1', 'commons-io:commons-io:1.4'
    }

Content copied to clipboard

#### Return

this ResolutionStrategy instance

#### Since

1.0

#### Parameters

notations

typically group:name:version notations to append