RootProject and ProjectRef

后端 未结 1 1156
抹茶落季
抹茶落季 2020-12-15 04:28

I have been trying to find more information on RootProject and ProjectRef, but looks like it is not mentioned at all in sbt documentation.

I understand that if you a

相关标签:
1条回答
  • 2020-12-15 05:33

    A single sbt build has a single project/ directory for .scala build definitions and plugin definitions. There can be multiple subprojects within that build with their own .sbt files, but not their own project/*.scala files.

    When you want to include other, separate builds directly instead of using their published binaries, you use "source dependencies". This is what RootProject and ProjectRef declare. ProjectRef is the most general: you specify the location of the build (a URI) and the ID of the project in the build (a String) that you want to depend on. RootProject is a convenience that selects the root project for the build at the URI you specify.

    Source dependencies do have an overhead: startup time, memory usage, and command line usability. If the group of projects don't need to be separate, it is best to use a single build with standard subprojects.

    0 讨论(0)
提交回复
热议问题