Android Studio: how to link my .aar library with multiple projects?

I have a library that I use in several projects. Every time I update (and rebuild) this library, I do not want to copy and paste .aar into EVERY single project that uses this library. What is the most convenient and efficient way to do this?

Note. I am running Android Studio 1.0 RC2 on Mac OSX.

+2
source share
1 answer

Upload your android library as an artifact to maven central or jcenter . Checkout is a guide that I fully deserve to be mentioned here to understand how to upload your android library to one of these central repositories, or both.

After downloading and syncing, you can simply reference your library using

dependencies {
     compile 'com.your.groupid:artifactid:x.x.x'
}

etc.

+1
source

Source: https://habr.com/ru/post/1589167/


All Articles