apply plugin: 'java'

// START SNIPPET file-set
task zipWithFileSet(type: Zip) {
    from ('contentDir') {
        include('**/*.txt')
        exclude('**/*.gif')
    }
}
// END SNIPPET file-set

// START SNIPPET files
task zipWithFiles(type: Zip) {
    from 'path_to_file1', 'path_to_file2'
}
// END SNIPPET files

// START SNIPPET zip-file-set
task zipWithZipFileSet(type: Zip) {
    from('contentDir') {
        include '**/*.txt'
        exclude '**/*.gif'
        into 'myprefix'
    }
}
// END SNIPPET zip-file-set

// START SNIPPET tar-file-set
task tarWithFileSet(type: Tar) {
    from('contentDir') {
        include('**/*.txt')
        exclude('**/*.gif')
        uid = 'myuid'
    }
}
// END SNIPPET tar-file-set
