'Android Studio How to build an aar file with gradle that has remote dependencies

I created a Android Library Module with Android Studio and I was able to use it in the apps and right now I need to use it for my other apps. So I was thinking about using the remote dependecies like Picasso https://github.com/square/picasso

 compile 'com.squareup.picasso:picasso:2.5.2'

And I would like to know what are the steps I need to take? I read few article and website. It is very confusing.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source