简体   繁体   English

如何生成具有嵌套依赖项的AAR

[英]How to generate a AAR with nested dependencies

I'm trying to generate an AAR of a project with the following module structure: 我正在尝试使用以下模块结构生成项目的AAR:

:my-library
   dependencies {
                    compile project(':my-library-core')
                }
:my-library-core
   dependencies { /* None */ }

My problem is that when I run the assemble task the generated AAR does include the my-library module classes, but it doesn't include my-library-core ones. 我的问题是,当我运行组装任务时,生成的AAR确实包括my-library模块类,但不包括my-library-core类。

How can I fix that? 我该如何解决?

The aar file doens't contain the transitive dependencies. aar文件不包含传递依赖项。

The alternative is to publish the library in a maven repository (public or private). 另一种方法是将库发布在Maven存储库 (公共或私有)中。 Gradle in this case with the pom file is able to download also the dependencies. 在这种情况下,带有pom文件的Gradle也可以下载依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM