Venkataramanan
Venkataramanan

Reputation: 165

Gradle always downloads dependencies with latest version

I have an app that uses 'library 1' and 'library 2' . Let's say library1 uses coil version-1(an image library for example) and library2 uses coil version 2... when implementing both library 1 and library 2 in my app... only the latest version of coil i.e., coil version 2 is downloaded... is there any way to mitigate this issue?

Upvotes: 0

Views: 249

Answers (2)

Edmund Johnson
Edmund Johnson

Reputation: 737

AFAIK you cannot have library1 using coil version-1 and library2 using coil version-2. Possible approaches:

  1. Do nothing, only works if library1 works with coil version-2.
  2. Force the coil dependency to be version-1. Only works if library2 works with coil version-1.
  3. Use an older version of library2 which has a dependency on coil version-1.
  4. Find an alternative library to library1 which uses a more recent version of coil.

Upvotes: 1

Anwar Shaikh
Anwar Shaikh

Reputation: 104

Why do you want coil version-1 ? Graddle always download newest version of the dependency by default.

Upvotes: 0

Related Questions