Accepted answer

You want it be an unmanaged resource (not source)

unmanagedResourceDirectories in Compile := Seq(baseDirectory.value / "src")
includeFilter in unmanagedResources := ""


The philosophy of SBT is to work by convention (and not by configuration) as much as possible. So the most straightforward solution, in many cases, isn't to look for the correct setting to tell SBT where your files are... But rather to figure out where SBT already expects to find them. You can check this page of the "getting started with SBT" guide for the basics.

For resource files that needs to be packaged together with compiled classes, the default directory is src/main/resources (a convention borrowed from Maven, like most of SBT's default directory structure). Similarly, files in src/test/resources are added to the classpath but only during tests.

If, for some reason, you want to use non-standard directories, you will want to have a look at this page of the documentation. For resources, the key to modify is resourceDirectory:

// resources in `resources` instead of `src/main/resources` :
resourceDirectory in Compile := baseDirectory.value / "resources"

// test resources in `test-resources` instead of `src/test/resources` :
resourceDirectory in Test := baseDirectory.value / "test-resources"

Related Query