I have the following structure for my project:
LibD(JNI) ---- LibC --- LibA -----| |----MyLibrary LibB -----|
MyLibrary depends on LibA and LibB
LibA depends on LibC
LibC depends on LibD which is a native library
I need to generate a single AAR file for MyLibrary that includes all other libraries and .so files from LibD using Gradle so I can put it on a maven repo
Note: These are not 3rd party libraries and I have the source code. I needed to separate them for reusability.
I have already tried the following, but it generates a separate .AAR files for each module
build.gradle - MyLibrary
apply plugin: 'android-library' dependencies { compile project(':LibA') compile project(':LibB') }
build.gradle - LibA
apply plugin: 'android-library' dependencies { compile project(':LibC') }
build.gradle - LibC
apply plugin: 'android-library' dependencies { compile project(':LibD') }
Any help/suggestion would be appreciated.
**** I've already looked at Android Studio how to package single AAR from multiple library projects? but since its an old topic I'm posting the question again