Skip to content

Instantly share code, notes, and snippets.

@mfdeveloper
Last active August 1, 2019 09:41
Show Gist options
  • Select an option

  • Save mfdeveloper/d1ac03caaa0346794da6f21d5eadce47 to your computer and use it in GitHub Desktop.

Select an option

Save mfdeveloper/d1ac03caaa0346794da6f21d5eadce47 to your computer and use it in GitHub Desktop.
Copy all dependencies declared in your .gradle file to "libs" folder.
/**
* 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