0

I've been reading and re-reading the docs, and everywhere it just says that by default sbt uses the project base directory and src/main/scala to look for scala sources, but I could not find any mention of how that default can be changed.

I have seen vague references to an "exclude" filters, but what I need is the opposite.

I would like to compile a subset of a large scala project into a smaller self-contained artifact. Is there a way to tell sbt exactly what files I want it to include? Something like "**/util/*.scala" for example?

Dima
  • 39,570
  • 6
  • 44
  • 70

1 Answers1

1

It is possible to customize sources path in SBT:

scalaSource in Compile := baseDirectory.value / "src"
scalaSource in Test := baseDirectory.value / "test-src"

More in documentation.

Alexey Kiselev
  • 916
  • 7
  • 8