Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Gradle Dependency Management

You're reading from  Gradle Dependency Management

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781784392789
Pages 188 pages
Edition 1st Edition
Languages
Author (1):
Hubert Klein Ikkink Hubert Klein Ikkink
Profile icon Hubert Klein Ikkink

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 content has changed.

Gradle caches dynamic versions and changing modules for 24 hours. We will see how we can customize this behavior in our Gradle build file and from the command line. However, before we take a look at the options, we will first see...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}