build.sbt:导入“项目”对象的位置是什么?

时间:2015-11-12 10:22:26

标签: scala sbt

build.sbt中,我们可以lazy val root = (project in file("."))

我知道sbt做了一些导入,但我在API文档中找不到我们如何直接使用'project'对象。

1 个答案:

答案 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).