gradle-watch-plugin icon indicating copy to clipboard operation
gradle-watch-plugin copied to clipboard

Provide possibility to define more than one watcher task

Open carstenlenz opened this issue 9 years ago • 0 comments

This would allow for example to have one compile watching task that compiles on a change in a source dir and additionally have a watching test tasks that runs compile and test on a change. You simply start whatever task you need. To put it more abstract: it would allow having multiple watcher tasks with overlapping watched dirs. :)

You could provide a default task 'watch' (as it is currently) and configure the task directly and not via a project extension. And a user could just create an additional task with other WatchTarget's

watch {
    java {
        files files('src/main/java')
        tasks 'compileJava'
    }
}

testWatch {
    java {
        files files('src/main/java')
        tasks 'check'
    }
}

carstenlenz avatar Mar 20 '15 19:03 carstenlenz