Hi folks, I use maven-style SNAPSHOT version numbering in my projects and deploy them to a Maven repository hosted in Artifactory. According to what I’ve read in a couple of other threads (listed below) Gradle should be treating these dependencies as changing modules and download from the remote repository whenever the SHA1 checksum in the remote repo is different from the checksum of the locally cached jar.
For me that’s not happening. Its only when I add the --refresh-dependencies switch that the remote jar will be downloaded.
This was a reported bug quite some time ago but was marked as resolved, seemingly without a specific fix being made. GRADLE-629
It gets worse if I’m using a local Maven repo. If another member of the team updates a dependency and it gets deployed to the remote repo my local build will not pull it down. Gradle sees the local Maven repo at the beginning of the repository chain, finds a version that matches what it has in its local cache and thinks that there is nothing to download. Not even the --refresh-dependencies switch works in this case.
I need the local Maven repo to workaround the fact that Gradle doesn’t publish to its own local cache. See GRADLE-1619. If mavenLocal() is not the first repository listed then I have a similar issue as before. The new jar in the local Maven repo will be ignored because Gradle will see that the jar in the remote repo is the same as it has in its local cache and it will stop checking at that point.
So I’m in a bit of a catch 22. Does anyone have any suggestions on to how to work effectively with snapshots? Is there a more Gradle-centric way of doing things?
I’m using Gradle version 1.1