Skip to content

Instantly share code, notes, and snippets.

@tophyr
Created January 30, 2014 09:38
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 tophyr/8705360 to your computer and use it in GitHub Desktop.
Save tophyr/8705360 to your computer and use it in GitHub Desktop.
// jar the classes.
Jar jar = project.tasks.create("package${buildType.name.capitalize()}Jar", Jar);
jar.dependsOn variantData.javaCompileTask, variantData.processJavaResourcesTask
jar.from(variantData.javaCompileTask.outputs);
jar.from(variantData.processJavaResourcesTask.destinationDir)
jar.destinationDir = project.file(
"$project.buildDir/$DIR_BUNDLES/${variantData.variantConfiguration.dirName}")
jar.archiveName = "classes.jar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment