在android中将库发布到bintray时如何包含依赖项

Mar*_*mos 5 android pom.xml maven bintray android-gradle-plugin

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.

kar*_*kar 2

您需要将您的库作为传递依赖项包含在内。你build.gradle应该有这样的东西:

compile('com.example.your.library:0.1.0@aar') {
    transitive = true;
}
Run Code Online (Sandbox Code Playgroud)