我有一个没有build.sbt的项目,而是有一个BuildSettings.scala文件。 我试图在那里启用替罪羊插件,并在这样做时遇到问题。 以下是我到目前为止所做的事情:
我将addSbtPlugin(" com.sksamuel.scapegoat" %%" sbt-scapegoat"%" 1.0.4")添加到project / plugins.sbt文件。然后尝试建立项目。它成功构建但当我尝试运行替罪羊时,它会出现以下错误
[error] Not a valid command: scapegoat (similar: set)
[error] Not a valid project ID: scapegoat
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: scapegoat (similar: aggregate)
[error] scapegoat
[error] ^
然后我尝试将scapegoatVersion添加到BuildSettings.scala文件中,这给了我编译时错误
project\BuildSettings.scala:29: not found: value scapegoatVersion
[error] scapegoatVersion := "1.0.4",
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
然后我将scapegoat添加为BuildSettings.scala文件的导入,认为缺少了。错误再次发生变化
[error] bad symbolic reference. A signature in ScapegoatSbtPlugin.class refers to type AutoPlugin
[error] in package sbt which is not available.
[error] It may be completely missing from the current classpath, or the version on
[error] the classpath might be incompatible with the version used when compiling ScapegoatSbtPlugin.class.
[error] project\BuildSettings.scala:29: not found: value scapegoatVersion
[error] scapegoatVersion := "1.0.4",
[error] ^
[error] two errors found
[error] (compile:compile) Compilation failed
我在这里可能会缺少什么?请建议一些方法/步骤,以便为我的项目正确启用此插件。
由于