在build.sbt
中,我们可以lazy val root = (project in file("."))
。
我知道sbt做了一些导入,但我在API文档中找不到我们如何直接使用'project'对象。
答案 0 :(得分:2)
This is written in the documentation:
import sbt._
import Process._
import Keys._
If you auto-complete project
in IntelliJ IDEA, it brings you to trait ProjectExtra
. This is available to due the fact that the package object sbt
mixes in this trait. This is a bit hidden in the API docs. But it's clear from the source code (and here).