I am planning to make jar file via Android Studio. The current version I am using is 2.1.2 and I have gone through the link How to make a .jar out from an Android Studio project. This was not helping me. since I tried to generate the jar and found nothing happened.
The thing I did as the link said are
- created a module name testLib (Android Library -> the reason I chose android library is to make use of common shared library file and permissions for android 6.0)
- And then I executed createJar and deleteJar in the gradel list.
- My Module:libtest is as follows
task deleteJar(type: Delete){
delete 'libs/libtest.jar'
}
task createJar(type: Copy){
from('build/intermediates/bundeles/release')
into('libs/')
include('classes.jar')
rename('classes.jar','libtest.jar')
}
createJar.dependsOn(deleteJar, build)
The above resulted with empty libs folder
Please help me with a solution. Thanks in ADVANCE