How to exclude a folder from compilation

In our Play project, we have this problem.

When we run our javascript tests, it starts compiling scala sources.

All javascripts tests are under test/assets , and any change inside this path should not initiate source compilation.

This means that this folder is mentioned somewhere as the source directory. I tried to see in which sbt property this folder could be redirected, but I did not find it.

Can someone give hints on how to prevent the compilation from starting when the file changes inside this folder?

+6
source share
1 answer

The watchSources task watchSources contain files tracked for change. To check the list of folders / files, enter the following in sbt:

 >show watchSources 

I'm not sure if this is the easiest solution, but it will remove test/assets from watchSources .

 watchSources <<= watchSources.map{ t => t.filterNot(x => x.getCanonicalPath.endsWith("test/assets")) } 
0
source

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


All Articles