As far as I know, you cannot include aars inside aar. They do not have configuration files that indicate the dependencies that they need. You can either
Number two is preferable since all your clients will need to include a link such as compile 'com.abc.efg:version' in order to capture all the dependencies. This is also a much better option, because there are ways to deal with version conflicts (for example, with an exclude group ).
Imagine that your client used a different sdk that was engaged in a different version of the modification. If your aran was provided to them using the first method, they won’t even be able to build the project at all due to version conflicts. However, with the second version, they can just do
compile ('com.abc.efg:version') { exclude group: 'com.squareup.retrofit2' }
and be free from all this headache. A real life example is the Facebook SDK. It attracts google gaming services, but people often already include this as a dependency on their project and run into problems like this .
Bill
source share