Nexus/Gradle lock specifc versions -


we using gradle build tool , sonatype nexus store project thirdparty , public artifacts.

there recent update public artifact com.abc:cde:3.4.2, wherein our project uses com.abc:cde:3.4.1

however, during build execution, gradle pulls latest version of artifact though build explicitly specified download 3.4.1

compile 'com.abc:cde:3.4.1' 

is there way download specific version of dependency though nexus has latest version of artifacts

you can force version numbers using resolution strategy on configuration.

e.g.

configurations.compile {   resolutionstrategy {       force 'com.abc:cde:3.4.1'   } } 

check out https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.resolutionstrategy.html more information.


Comments