How to get latest local snapshot dependency?

On my maven local I have several versions of my libraries:

1.0.0
1.0.1-SNAPSHOT
1.0.1

The preferred library is 1.0.1, followed by 1.0.1-SNAPSHOT and finally 1.0.0.
How can I tell this to gradle?

You can simply use the version string 'latest.integration'.

compile 'com.foo:bar:latest.integration'
1 Like