# failOnVersionConflict

abstract fun failOnVersionConflict(): ResolutionStrategy

In case of conflict, Gradle by default uses the newest of conflicting versions. However, you can change this behavior. Use this method to configure the resolution to fail eagerly on any version conflict, e.g. multiple different versions of the same dependency (group and name are equal) in the same Configuration. The check includes both first level and transitive dependencies. See example below:

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

    configurations.all {
      resolutionStrategy.failOnVersionConflict()
    }

Content copied to clipboard

#### Return

this resolution strategy instance

#### Since

1.0-milestone-6