I had a project library in Eclipse with Maven and the generated jar included some libraries dependencies inside. Now I am migrating to Android Studio and I would like to build the same jar. I can generate a jar with the following lines in gradle:
task clearJar(type: Delete) {
delete 'build/libs/mysdk.jar'
}
task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('release/')
include('classes.jar')
rename ('classes.jar', 'mysdk.jar')
}
makeJar.dependsOn(clearJar, build)
But inside the jar there are not included the libraries that I use in my project library. With Maven I can use the "provided" scope in order to include or not a library in my jar but with gradle... how can I do that?
Thanks