Last active
August 1, 2019 09:41
-
-
Save mfdeveloper/d1ac03caaa0346794da6f21d5eadce47 to your computer and use it in GitHub Desktop.
Copy all dependencies declared in your .gradle file to "libs" folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Custom task to copy all dependencies declared in you .gradle file | |
| * to "libs" folder. If their dependencies contains .jar files, this will be released | |
| * on aar or .jar final file of your project. | |
| */ | |
| task copyLibs(type: Copy) { | |
| from configurations.compile | |
| into 'libs' | |
| } | |
| afterEvaluate { | |
| android.libraryVariants.all { variant -> | |
| variant.javaCompiler.dependsOn(copyLibs) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment