Albert
09/22/2019, 1:57 PMwasyl
09/22/2019, 6:02 PMprovided
will not pull the dependency transitively, i.e. if someone uses your lib but not the one that you specify as provided
, it will not be available in runtime. On the other hand if you use compile
then the library will be fetched, even if someone doesn’t declare it explicitly.
Since most dependencies are in fact required by the libraries, specifying provided
would be pretty annoying (imagine every library required all of their dependencies to be declared explicitly. That would also mean dependencies of the dependencies and so on).
I don’t think you need to be concerned about messing with the versions: higher version will be pulled automatically, and if someone needs some specific version then there’s plenty of options in Gradle to pin dependencies to versions. Most libraries follow SemVer so it’s not a very popular problem that something breaks because a dependency updated dependency, imowasyl
09/22/2019, 6:03 PMDALDEI
10/02/2019, 10:44 AM