kezong / fat-aar-android

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

[HELP]怎么把android或androidx模块打进aar #382

Open zhongqingsong opened 2 years ago

zhongqingsong commented 2 years ago

Describe the issue 我的aar依赖了第三方的AAR,然后我想把完整的android相关的引用也打进aar里。

Build Environment

我这边要打包一个aar,包括了一些第三方的aar。开始的业务就是多个aar合到一起,没有问题。FatAar已经完成了,新的aar已经运行起来了。但是,新的反馈过来了,要我把android或androidx相关的内容也打进aar里。
那我看文档写的 不包括就用 implementation。然后我改成了
embed 'androidx.appcompat:appcompat:1.2.0' 加了这个后,就打包失败了。一直失败,也试过了加入 transitive = true 加了上面的这个,只是报的错不一样了,还是没办法打进去。本来我以为是打不进去aar。结果我看到有位兄弟再问怎么去掉这个android的模块,那么我意识到,应该是有办法打进android模块的了。

https://github.com/kezong/fat-aar-android/issues/353

Xiuz-Hmy commented 1 year ago

fataar { /**

harshitsaxenainit commented 1 year ago

fataar { /* If transitive is true, local jar module and remote library's dependencies will be embed. (local aar module does not support) If transitive is false, just embed first level dependency Default value is false @SInCE 1.3.0 / transitive = true }

this doesn't work.