Resolution
    interface ResolutionStrategy
Defines the strategies around dependency resolution. For example, forcing certain dependency versions, substitutions, conflict resolutions or snapshot timeouts.
Examples:
plugins {
    id 'java' // so that there are some configurations
}
configurations.all {
  resolutionStrategy {
    // fail eagerly on version conflict (includes transitive dependencies)
    // e.g. multiple different versions of the same dependency (group and name are equal)
    failOnVersionConflict()
    // prefer modules that are part of this build (multi-project or composite build) over external modules
    preferProjectModules()
    // force certain versions of dependencies (including transitive)
    //  *append new forced modules:
    force 'asm:asm-all:3.3.1', 'commons-io:commons-io:1.4'
    //  *replace existing forced modules with new ones:
    forcedModules = ['asm:asm-all:3.3.1']
    // add dependency substitution rules
    dependencySubstitution {
      substitute module('org.gradle:api') using project(':api')
      substitute project(':util') using module('org.gradle:util:3.0')
    }
    // cache dynamic versions for 10 minutes
    cacheDynamicVersionsFor 10*60, 'seconds'
    // don't cache changing modules at all
    cacheChangingModulesFor 0, 'seconds'
  }
}
Content copied to clipboard
Since
1.0-milestone-6
Types
Functions
Link copied to clipboard
                  Activates dependency locking support in Gradle.
Link copied to clipboard
                  Sets the length of time that changing modules will be cached, with units expressed as a String.
Sets the length of time that changing modules will be cached.
Link copied to clipboard
                  Sets the length of time that dynamic versions will be cached, with units expressed as a String.
Sets the length of time that dynamic versions will be cached.
Link copied to clipboard
                  Configures the capabilities resolution strategy.
Link copied to clipboard
                  The componentSelection block provides rules to filter or prevent certain components from appearing in the resolution result.
Link copied to clipboard
                  Deactivates dependency locking support in Gradle.
Link copied to clipboard
                  Configures the set of dependency substitution rules for this configuration.
Link copied to clipboard
                  Deactivates dependency verification for this configuration.
Link copied to clipboard
                  Adds a dependency substitution rule that is triggered for every dependency (including transitive) when the configuration is being resolved.
Link copied to clipboard
                  Enabled dependency verification for this configuration.
Link copied to clipboard
                  If this method is called, Gradle will make sure that no changing version participates in resolution.
Link copied to clipboard
                  If this method is called, Gradle will make sure that no dynamic version was used in the resulting dependency graph.
Link copied to clipboard
                  Configures Gradle to fail the build is the resolution result is expected to be unstable, that is to say that it includes dynamic versions or changing versions and therefore the result may change depending on when the build is executed.
Link copied to clipboard
                  In case of conflict, Gradle by default uses the newest of conflicting versions.
Link copied to clipboard
                  Allows forcing certain versions of dependencies, including transitive dependencies.
Link copied to clipboard
                  Returns the capabilities resolution strategy.
Link copied to clipboard
                  Returns the currently configured version selection rules object.
Link copied to clipboard
                  Returns the set of dependency substitution rules that are set for this configuration.
Link copied to clipboard
                  Returns currently configured forced modules.
Link copied to clipboard
                  Gradle implicitly registers dependency substitution rules for all configurations in the whole build tree to find projects in other included builds.
Link copied to clipboard
                  Gradle can resolve conflicts purely by version number or prioritize project dependencies over binary.
Link copied to clipboard
                  Allows forcing certain versions of dependencies, including transitive dependencies.
Link copied to clipboard
                  Specifies the ordering for resolved artifacts.