auto import marking subproject src/test/scala directory as source instead of test

I have a workspace being auto imported from sbt in a directory structure like this:

 

scala/ (main workspace root)

scala/.idea  (with all the workspace stuff)

scala/libs/a/build.sbt

scala/libs/a/src/main/scala/....

scala/libs/a/src/test/scala/.....

scala/service/b/build.sbt

scala/service/b/src/main/scala/....

scala/service/b/src/test/scala/...

 

When the project does a auto-import from sbt, it marks service/b/src/test/scala and libs/a/src/test/scala as source directories instead of test directories.  I assume this is because the workspace is a couple directories above the build.sbt files for the projects.  This means in order to compile the project I need to keep changing them back every time the project syncs from sbt.  Is there a way to have IDEA mark these as test directories during the import?

 

 

 

 

1

请先登录再写评论。