Sushil Mishra
Sushil Mishra

Reputation: 41

Package a library project which uses another library aar

I am creating a library project (lets say B) and I have a dependency for another library (lets say A) which I have in the form of an aar (e.g. a.aar) file. Now the problem here is we can directly use a.aar files in an Application project but for using it with a library project, I have to first add it as a different module.

My question here is, after building the project when the b.aar is generated, will the a.aar file be packaged inside b.aar file? or will I have to share both a.aar and b.aar to the app developer?

Upvotes: 4

Views: 107

Answers (1)

orkunsoylu
orkunsoylu

Reputation: 26

The dependencies of a Android Library Project will not be bundled within the aar of the library. When someone else adds your library as a dependency, the dependencies of your library will need to included in the parent project.

In short, you need to share your aar dependency with the application developer who will use your library.

Upvotes: 1

Related Questions