android - how to make single AAR file, having some other AAR files


Keywords:android 


Question: 

Could you help me to understand the general concept of building android library and use it in user's application.

So, there is following situation:

In android studio there are following modules:
core
data
drawing

and there is a module
app
with dependencies on above modules.

app.gradle

dependencies {
    compile project(':core')
    compile project(':data')
    compile project(':drawing')
}

so I can run the app from Android Studio.

But I would like to have something like AAR file and include it in any app to be able use it again without creation the same modules.

I'm not very familiar with Gradle so I'm not sure is it possible and how to do it.


1 Answer: 

From my experience, an AAR is created for each library module.

Generated AAR created during build can be found in "yourmodule\build\outputs\aar". (on Android Studio) You can use these AAR in other projects