lives
lives

Reputation: 1185

gradle how to avoid latest version being pulled from artifactory

My gradle dependency tree shows as below

+--- org.apache.lucene:lucene-core:3.6.2 -> 4.5.1

Since there are few changes in 4.5.1 which are not backward compatible , I want to force version 3.6.2 to be picked up.

how to stop gradle from pulling the latest version from the artifactory ?

Upvotes: 1

Views: 39

Answers (1)

RaGe
RaGe

Reputation: 23677

You can use gradle's resolution strategy to override declared dependency versions:

configurations.all {
  resolutionStrategy {
    force 'org.apache.lucene:lucene-core:3.6.2'
  }
}

Further Reading

Upvotes: 1

Related Questions