Reputation: 20050
I am building an SDK for Android that should be exported as an .aar file.
The SDK has a list of dependencies defined in its build.gradle file, for example:
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services-ads:9.0.2'
My question is: how do i include these libraries in the .aar, so that it is self-contained and does not require the developer using it to add these libraries when using my SDK?
I have looked everywhere for this, but most answers don't seem to address this issue or don't work.
Upvotes: 5
Views: 1376
Reputation: 2853
How do i include these libraries in the .aar
Not at all.
An .aar
-file is not intended to contain it's own dependencies
You should use a dependency management system (like maven or ivy) to distribute your SDK in order to handle transitive dependencies.
Upvotes: 3