Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not specifying Gradle minor version

Tags:

gradle

Using gradle:

Is it possible to set the dependencies such that minor versions are auto upgrading? For instance, I would like gradle to automatically pick the latest guava 11 minor version.

Adding

compile 'com.google.guava:guava:11'

unless of

compile 'com.google.guava:guava:11.0.2'

do not seems to work.

like image 766
Pierre-Antoine Avatar asked Feb 11 '23 19:02

Pierre-Antoine


2 Answers

The syntax to use is "11.+" if you want any minor revision above 11.0.0.

If you want for example 11.0.2 but not 11.1.0, you can use "11.0.+".

Using "11+" will probably also find 12.0.0 and above, so would not work as well.

This is mentioned in the Gradle user's guide, where it's referred to as a dynamic version.

like image 182
Jolta Avatar answered Feb 15 '23 03:02

Jolta


Replace it with:

compile 'com.google.guava:guava:11.+
like image 20
Opal Avatar answered Feb 15 '23 03:02

Opal