Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20373

How can i get the snapshot timestamp of an artifact from nexus , in my build.gradle dependencies

$
0
0

From your message, I think you’re saying the issue is just that you’re not downloading the most recent SNAPSHOT version that you expect. The title indicates a different ask.

A SNAPSHOT version is classified as a “changing” version. Changing versions are resolved and cached once every 24 hours. If you always want the latest SNAPSHOT from Nexus, you can force changing versions to be cached for less time. For example, to never cache:

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

This will increase network requests though. Consider if there’s some amount of time that is reasonable. For example, if it takes 2 minutes to build and publish a new SNAPSHOT, it may be reasonable to set this to 2 minutes.


Viewing all articles
Browse latest Browse all 20373

Trending Articles