What are the possible ways of specifying version ranges in gradle dependencies? I saw some 1.+ notation but I have not found a document which really says what is possible and wh
Specify the version range using Ivy notation. Here are some examples copied from this web page:
[1.0, 2.0]
: all versions >= 1.0 and <= 2.0[1.0, 2.0[
: all versions >= 1.0 and < 2.0[1.0, )
: all versions >= 1.0 // avoid. Unbound is dangerous!
Use '+' in the major, minor or patch number. This approach has at least two issues:
1.1.+
and 1.1+
in a gradle dependency.Avoid dynamic dependencies (using '+' or version ranges) altogether. Instead, use a fixed version dependency and update the version often with good testing. Here's why:
The book "Gradle Dependency Management" states on p. 12 and 13 that, in addition to the +-notation (2.1.+ means the range from 2.1.0 inclusive to 2.2.0 exclusive) you can use the Ivy notation for open and closed intervals of the form
[1.0,2.0]
[1.0,2.0[
or also
[1.0, )
for "all versions starting from 1.0".