How to include dependencies when publish the library to bintray in android

一个人想着一个人 提交于 2019-12-22 07:58:17

问题


I'm new to publish own library in android. I created my own library and uploaded it to bintray. My library depends several third party libraries. When I see pom.xml file, there are dependency information. But when I add my library to test project gradle, it didn't import its dependencies. So I had to add it manually test project's gradle. How can I import dependency module automatically when I add my library to test project's gradle? Is there anyone that can solve this? My library is on binary's maven repository. I find expert in this scope now.


回答1:


You need to include your library as a transitive dependency. Your build.gradle should have something like this:

compile('com.example.your.library:0.1.0@aar') {
    transitive = true;
}


来源:https://stackoverflow.com/questions/41621704/how-to-include-dependencies-when-publish-the-library-to-bintray-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!