I am writing sdk android and now I want to distribute it, but I have problems with my dependencies. I use gradle and android studio.
My sdk has a dependency on volleyball and gson, and I added them as banks in my sdk. When I try to create aar or jar for use in a separate client application, I always get a failure when my sdk ever tries to reference a salvo, since it was not included in either aar or jar. Any ideas on how I should do this? I decided to create live banks with great success.
I also tried using remote dependencies, as shown below, but even after gradle build in the client application, both volleyball and gson are still not included. This is currently what I have in my sdk build.gradle
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.mcxiaoke.volley:library-aar:1.0.0' compile 'com.google.code.gson:gson:2.3' }
and then in the gradle client build i have
repositories { flatDir { dirs 'libs' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile(name:'mysdk-1.0.0', ext:'aar') }
I am using ./gradlew clean build to build the aar and jar of my sdk. Can someone tell me the correct way to include dependencies in my own library?
source share