AAR does not include module resources

I have an Android library made up of 2 modules:

Project Root
+-- moduleA
|   +-- src
|   \-- build.gradle
|
+-- moduleB
|   +-- src
|   \-- build.gradle
|
+-- build.gradle
+-- settings.gradle

      

settings.gradle

include ':moduleB', 'moduleA'

      

ModuleA / build.gradle

apply plugin: 'com.android.library'
...
dependencies {
    compile project(':moduleB')
}

      

moduleB / build.gradle

apply plugin: 'com.android.library'
...

      

When I try to use the AAR generated with gradle the resources of module B are not included. I tried to push both AARs to maven local, but the same result.

If I change the type of moduleA to application

instead library

, the generated APK includes the correct resources.

What should I do, I can get an AAR that contains both module resources?

+3


source to share





All Articles