Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DirList extends DefaultTask {
- @Input
- String path
- File dh
- @Option(option = 'fileSet', description = 'Set the filename of the directory')
- void setDir(final String path) {
- this.path = path
- }
- @TaskAction
- def list() {
- dh = new File(this.path)
- dh.eachFile {
- println(it)
- }
- }
- }
- task list(type: DirList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement