Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gradle Dependency Management

You're reading from   Gradle Dependency Management

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781784392789
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hubert Klein Ikkink Hubert Klein Ikkink
Author Profile Icon Hubert Klein Ikkink
Hubert Klein Ikkink
Arrow right icon
View More author details
Toc

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...

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 $19.99/month. Cancel anytime