Skip to content

Instantly share code, notes, and snippets.

@worldofchris
Created January 2, 2013 14:40
Show Gist options
  • Save worldofchris/4434984 to your computer and use it in GitHub Desktop.
Save worldofchris/4434984 to your computer and use it in GitHub Desktop.
Decided to start stashing my Gradle odds and ends somewhere for future reference...
// Create a tar file from a filtered tree of files
// e.g. a tree of Python Source files
project.ext {
pythonFiles = fileTree('src').include('**/*.py')
}
task tarPythonFiles (type: Tar) {
from pythonFiles // Source is our fileTree
includeEmptyDirs false // Otherwise we get ALL the dirs in the fileTree
baseName project.name // Name is taken from the project directory
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment