如何在项目的 Scala 构建定义中定义包后的目录结构? [英] How to define directory structure following packages in project's Scala build definitions?
问题描述
sbt 项目中有两个完整的构建定义文件:Build.scala
和 Helpers.scala
.它们位于 project
文件夹中.
我想将 Helpers
模块放入单独的子文件夹 project/utils
.当我在 Build.scala
中执行 import utils.Helpers
时,它说:
未找到:object utils
是否可以在 sbt 完整构建定义中定义遵循包的目录结构?
你应该使用 project/src/main/scala/utils
而不是 project/utils
>
There are two full build definition files in sbt project: Build.scala
and Helpers.scala
. They are located in project
folder.
I'd like to put Helpers
module into separate sub-folder project/utils
. When I do import utils.Helpers
in Build.scala
it says:
not found:
object utils
Is it possible to define directory structure that follows the packages in sbt full build definitions?
you should use project/src/main/scala/utils
instead of project/utils
这篇关于如何在项目的 Scala 构建定义中定义包后的目录结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!