How to find out which files were modified using Sbt

Sbt can re-run tasks when some of the files viewed have changed (~ task). How to find out which files have been changed?

+4
source share
1 answer

You can add this to your build.sbt file to see which files are being viewed:

watchSources ~= { files => println(files.mkString("\n")+"\n\n\n") files//here you can add files or filter out } 

This can help you test specific test classes: ins sbt (interaction mode):

 ~test-only full.path.test.ClassName 

To track file changes, you can use Java 7 WatchService or Apache VFS for Java 6.

Source: WatchService for Java 6

+2
source

Source: https://habr.com/ru/post/1444886/


All Articles