There’s not an easy way to declare a dependency requirement that combines a version range with a SNAPSHOT dependency or a check for ivy status (release vs integration).
It’s possible you could build something using component metadata rules, where you use ‘latest.release’ as the dependency requirement, and maintain the required version range separately. You could then use a rule to force the status to be ‘integration’ for any version that doesn’t match the range.
Our repositories are Maven repositories, So my question is will latest.integration and latest.release work to get latest snapshot/release builds?
Also component metadata rules seems very interesting, Is there an example i can look which sets the status when uploading snapshot or releases and then it can be used in metadata rules so right build is selected.
Gradle considers every external module to have a ‘status’. For Ivy modules, this value is read from the ivy.xml. For Maven, SNAPSHOT modules have a status of ‘integration’, while other Maven modules have a status of 'release.
If you can wait, we’re currently working on a mechanism that let’s you choose whether a particular module matches a version selector. This will let you hook in whatever logic you want. Expect to see something in the next month.