问题
I understand that in an sbt
project, sbt
generates a folder called project containing build.properties
and plugins.sbt
. Now if I have one project that has multi subprojects, should I have only one folder called project
in the root project or different folders named project foreach subproject?
回答1:
You should have only one project
folder. You can read about it at Multi-project builds in sbt documentation.
For example, to the following sbt:
name := "new_proj"
version := "0.1"
scalaVersion := "2.13.4"
lazy val root = (project in file("."))
.aggregate(util, core)
lazy val util = (project in file("util"))
lazy val core = (project in file("core"))
You should have the structure:
new_proj
|- build.sbt
|- project
|- build.properties
|- core
|- src
|- main
|- scala
|- util
|- src
|- main
|- scala
来源:https://stackoverflow.com/questions/65567049/project-folder-in-sbt