In this scenario, if version 1.21 exists and is the latest version, I
would like to fail, since I want greater than or equal to 1.22, but
1.2+ will look for >= 1.20. How can I specify this? Is this possible?
I don’t think there is any documentation about this, but since Gradle originally used Ivy under the hood for all its dependency management functionality, I took a look at the Ivy documentation regarding dynamic versions:
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html
It has only slightly more than the Gradle documentation. I tried experimenting in Gradle with Ivy-style version ranges:
compile group: 'log4j', name: 'log4j', version: '[1.2.12,1.2.17]'
and surprisingly it seems to sometimes work depending on what the version range is. In the example above it resolves to 1.2.17
.
I know this doesn’t fully address your questions (which I am curious about too) but hopefully it provides a bit of information for you.