-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问对于多级依赖的项目是否适用? #14
Comments
首先,试用于该插件的应该是library,而不是application。 如果module1和module2都需要合入主module中产生的aar中,则需要在主module中添加对module1以及module2的embed依赖(哪怕主module只依赖于module1, 但是module1依赖了module2,所以都需要在主module中加embed)。
|
感谢回答。那主module添加对module2的依赖是只需要embed还是embed+compileOnly? |
加compileOnly只是为了编码时引用到该依赖可以代码提示,并不会影响实际编译结果,如果你实际上不直接依赖该module,可以只加embed。 |
作者你好,还是library引用module1,module1引用module2,但是module2中引用了eventbus,okhttp等第三方,这需要特殊处理吗?另外我这里确定已经使用embed引用了所有的module,但是还有会有错误找不到符号的。 |
看你是否需要将eventbus和okhttp整体打包,如果需要整体打包,就需要在library中embed eventbus以及okhttp; |
需要添加的module都已经使用embed,然后我这里改用了1.1.6版本能成功了。但是碰到另一个问题。我有个基础保common,其中包含Gson的引用,gradle使用的是api的方式引入。打出来的aar中有地方引用了gson,这个时候会报错,因为包中没有gson相关内容。不知道这块有没有什么建议。 目前使用的版本情况是: |
要么将gson通过embed一起打包,要么在app中引入aar的同时通过implementation或者api引入该gson库。 |
作者你好。
假设主工程app依赖module1, 然后module1依赖module2。那么我是否只需将主工程app对module1的依赖方式改为文档中说的embed+compileOnly就可以了?还是说module1对module2的依赖方式也要一样的修改掉?
目前我是遇到了#11类似的问题
The text was updated successfully, but these errors were encountered: