Thanks for that. Very helpful. Can I suggest that you add the text you wrote to the documentation. I think that’s quite important for people to know and the “changing” flag isn’t clearly documented (that I found) outside the Javadoc for gradle.
I’m still not sure if this is a bug. Should the hyphen be part of the check that this is a snapshot or just the word “SNAPSHOT”?
There seems to be somewhat of a disconnect between the Maven deployment code and our resolution logic. You don’t necessarily have to create discrete versions for your module, you just simply can’t use the version ‘SNAPSHOT’, you’ll have to name it anything else. This in conjunction with changing = true should give you the result you’re looking for.
Well, I named it “99-SNAPSHOT” which counts as anything else. Thanks for all your help, but I still think this functionality needs to be better documented in gradle. It is all a bit ‘magic’ as to why it sometimes works.
Even the ‘changing’ flag isn’t documented to mean “will look for timestamped pom versions”. Rather, its documentation seems to suggest that the functionality is only “check for new versions often and don’t rely on the cache”.
I’m beginning to think this might actually be an issue with Maven. The code I linked to above seems to indicate that a version of “SNAPSHOT” is not valid, however Maven is perfectly content with publishing such a module and will use the timestamp name scheme as with other snapshots. In any case I’ve raised GRADLE-3350 to track this as we should probably handle this case better.