Build Android Jar file including all depending sources and jars using gradle -


i have android project including modules , want build each module jar file including depending sources , jar libraries.

ive changed gradle file , builds module nicely, without depending sources , jars.

here gradle file

apply plugin: 'com.android.library'  android {     compilesdkversion 22     buildtoolsversion "21.1.2"      defaultconfig {         minsdkversion 15         targetsdkversion 22         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     }      sourcesets {         main  {             java {                 srcdir 'src'             }         }     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.2.0'     compile 'com.parse.bolts:bolts-android:1.2.0' }   task clearjar(type: delete) {     delete 'build/libs/myfancylib.jar' }  task makejar(type: copy) {     from('build/intermediates/bundles/release/')     into('build/libs/')     include('classes.jar')     rename ('classes.jar', 'myfancylib.jar') }  makejar.dependson(clearjar, build) 


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -