我想将我的图书馆打包成aar.
I want to package my library as an aar.
该库具有多个依赖项(通用图像加载器,ORMLite,番石榴...)
The library has several dependencies (universal image loader, ORMLite, guava...)
它也依赖于我编写的另一个库(称为库B").
It also has a dependency for another library that I wrote (call it 'library B').
我有2个问题:
推荐答案
将要使用我的库的每个人都需要根据库的依赖项(通用图像加载器,ORMLite,番石榴...)添加依赖项
Will everyone who will use my library need to add dependencies according to the library's dependencies (universal image loader, ORMLite, guava...)
如果您将AAR作为工件以适当的元数据(例如Maven样式的POM文件)在存储库中分发,则不会.元数据将指向您的依赖关系,而构建系统(例如Gradle)将获取依赖关系.
Not if you are distributing your AAR as an artifact in a repository with appropriate metadata (e.g., Maven-style POM file). The metadata will point to your dependencies, and build systems (e.g., Gradle) will pull in the dependencies.
我需要为库B"创建一个单独的aar吗?
Do I need to create a separate aar for 'library B'
是的,否则除非您消除它并将其代码折叠到您的第一个库中,否则没有人可以访问它.
Yes, otherwise nobody will have access to it, unless you eliminate it and fold its code into your first library.
我的lib用户是否有单独的依赖项?
and have users of my lib have a separate dependency for it?
有关设置依赖性的信息,请参见上文.
See above for setting up dependencies.
更多推荐
打包具有依赖项的Android AAR
发布评论