Skip to content

Instantly share code, notes, and snippets.

@nisrulz
Created October 2, 2015 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nisrulz/4cc3a6ed81cd2a241e9e to your computer and use it in GitHub Desktop.
Save nisrulz/4cc3a6ed81cd2a241e9e to your computer and use it in GitHub Desktop.
Task to generate a JAR from an android library module
// Place this in the 'build.gradle' of the library module
// Task : Generate a JAR
// Usage : In the terminal, run './gradlew jar'
// Output : Get the jar at 'build/libs'
task jar(type: Jar, dependsOn: 'assembleRelease') {
from fileTree(dir: 'build/intermediates/classes/release')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment