kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+
MIT License
3.12k stars 617 forks source link

Transitive dependencies of embedded dependencies are not added to pom #257

Open Legion2 opened 3 years ago

Legion2 commented 3 years ago

Describe the issue Transitive dependencies of embedded dependencies are not added to pom when publishing the fat-aar to maven. For example :main depends on :lib and therefore use embed project(':lib'). :lib depends on remote dependencies, which should not be embedded into the fat-aar, but are required, so they should be added to the pom which is generated when the fat-aar is published to a maven repository.

Build Environment

piotrprzywieczerski commented 2 years ago

Hi, just came across the same problem. I've noticed that as a workaround you could declare those transitive dependencies missing in pom file as dependencies of app module but in the long run this would be a nightmare. I was expecting that as an other workaround I can use transitive property but even this doesn't work...I might be missing something - I've just set fataar { transitive = true } in the build.gradle of "main" lib module but having Retrofit as a dependency in the "sub"module of the main lib this still doesn't work unless I add retrofit dependency in the app module. I've also notice that example project doesn't cover this situation so it's hard to verify if my implementation fails or this is general problem.