I had library project in Eclipse and the library project also some libraries dependencies inside it.
Now I migrate Eclipse to Android studio and I would like to build jar from library project.
I successfully generated jar in Android studio but the problem is that inside jar there is not included reference library.
Can you please help How to do reference Some other library inside main library so it will include in Android Studio Generated jar.
I reviewed all link but it is only related to single library. But my question is different.
I have tried following code but not getting classes of dependent library in my jar
task jarTask(type: Jar) {
baseName="my-sdk-android"
from 'src/main/java'
}
task createJarWithDependencies(type: Jar) {
baseName = "my-sdk-android-jar-with-dependencies"
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
with jarTask
}
configurations {
jarConfiguration
}
artifacts {
jarConfiguration jarTask
}