简体   繁体   中英

Create an aar which has multiple aar files as dependencies

I am trying to build an sdk which has more than one aar as dependencies. I like to ship my sdk as one aar. so the structure would be

ProjectFolder
|
+--AndroidLibs
| |
| +--lib 1(android library - AAR)
| |
| +--lib 2(android library - AAR)
|
|
+--SDK(depends on lib 1 and lib 2)
|
+--APP(depends on SDK)

There is no support for merging multiple AARs into a single AAR.

The solution is to manually add the dependencies of the library you want to use or publish your artifacts on jCenter or Maven and define your dependencies rules in their .pom files

Even though there is no any official Gradle support for this, you can use a plugin for this. An example plugin: https://github.com/Mobbeel/fataar-gradle-plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM