Sunday, January 5, 2014

3rd party libraries and Using maven

When using 3rd party open source libraries, we usually get the choice either to download the JAR/project files or to use Maven to fetch them. We should always try and use Maven for better maintenance and version control.
If the library owner hasn’t mentioned if it’s being released in maven, you can always try and search it in: .

Maven, Android Studio and Gradle

Using Android Studio gives you an easy access to Maven repositories.
It starts with your `build.gradle` file.
All you have to do is first declare you are looking at the main maven central (this has probably is already set at the top of the file), And then point to direct Maven link you would like to use as a library,
For example - my favorite library for image loading.

Updating to a newer library version

We should be careful when upgrading a version of a 3rd party library, there’s always the risk of breaking the code with that update. An update should be made after revising the change log, and should be merged back only after testing it out. Be sure to do the update on a separate commit so you could track down changes and be able to “blame” it for certain unwelcome behaviours if occur.