Using dynamic versions and changing modules

In Chapter 1, Defining Dependencies, we already learned about dynamic versions. For example, we can use a range of versions such as [4.0.1.RELEASE,4.0.4.RELEASE[. When the dependency is resolved by Gradle, the latest available static version in the range is selected.

A changing module is different than a dynamic version. A changing module references a dependency with the same version but with changing artifacts. For example, in a Maven repository, a changing module is the snapshot module indicated by -SNAPSHOT in the version attribute. Gradle can resolve a changing module dependency and get the latest artifact for the given version. However, the next time, a new artifact might be downloaded because the ...

Get Gradle Dependency Management now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.