我正在做一个有几个模块的项目,像这样:
:app
:coreLib
:exportLibrary
:otherLibrary
在我的exportLibrary
模块的build.gradle
中,我像这样导入coreLib
:
实现(项目(“coreLib”))
在我的应用程序中,我做同样的事情来包含 exportLibrary
:
实现(项目(“exportLibrary”))
我想做的是将 exportLibrary
发布到 Maven 存储库,我希望它包含 coreLib
中的所有内容。我还没有找到一个好的方法来做到这一点。添加传递标志没有帮助。我错过了什么?
我希望我也不需要发布coreLib
!
我正在使用 artifactoryPublish
进行发布,其中包括在运行 assembleRelease
之后创建的 Artifact 。那么,基本上我如何让 assembleRelease
生成包含我的本地依赖项的二进制文件?
最佳答案
只需在 maven 仓库中发布 coreLibrary
。
然后在您的 exportLibrary
中更改依赖项:
implementation "com.xxxx.coreLibrary:x.y.z"
并在maven中发布。
此时,如果您检查 repo 中 exportLibrary
的 pom 文件,您会发现对 com.xxxx.coreLibrary:x.y.z.
关于android - 我可以在我发布的 aar 库中包含一个本地模块吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55525854/