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 what is not. Furthermore, I do not know whether the Maven ranges can be used as well.
Can somebody give me a short overview so that I can understand the rules?
In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here. Option 2- gradle-wrapper.properties. If you are using the Gradle wrapper, then your project will have a gradle/wrapper/gradle-wrapper.
You can use the version string “latest. integration” to achieve this. This is a dynamic version that tells Gradle to use the very latest version of a dependency. Note that for a maven repository, this feature requires that the list of all available versions is published in a maven-metadata.
To change that, you need to change the PATH variable. There are also tools like sdkman and similar that can switch between different Gradle versions. But actually you shouldn't really need that, or even need an installed Gradle version, let alone two.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With