fat-aar-android icon indicating copy to clipboard operation
fat-aar-android copied to clipboard

Compiler does not see embedded AARs in project dependencies

Open JessHolle opened this issue 2 years ago • 1 comments

If you use embed to embed various AARs in an Android library project and then include that project as a project (not Maven) dependency in a sibling app or library project, then in the including project the Java compiler will not see the classes in those AARs.

There is workaround, which is to include such AARs as compileOnly dependencies in the including project (since embed will ensure the classes get embedded in the resulting AAR just fine), but this is a bit of a pain. If this issue cannot be addressed by this plugin (i.e. due to the way the Android Gradle Plugin works), then it would be good to explicitly document this issue and the workaround.

(This is using Android Gradle Plugin 7.0.4, Gradle 7.3, and build-tools 31.0.0 in case any of that matters.)

JessHolle avatar Dec 13 '21 15:12 JessHolle

To be clear I don't want to embed one of these library projects in the other. I want 2 distinct AARs, one (A) which embeds other AARs and the other (B) which uses A and the AARs it embeds.

JessHolle avatar Dec 13 '21 16:12 JessHolle