【发布时间】:2016-03-06 01:20:20
【问题描述】:
我正在尝试了解如何编写编写良好的 build.sbt 文件,并遵循 youtube 上的教程。在那个教程中,创建了一个类似于下面的对象,但我写的内容给出了显示的错误。
我做错了什么?
我试图删除导入和对象声明之间的空白行而不做任何更改。
import sbt._
import sbt.Keys._
object BuildScript extends Build {
lazy val commonSettings = Seq(
organization := "me",
version := "0.1.0",
scalaVersion := "2.11.4"
)
lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(
name := "deepLearning",
libraryDependencies += "org.deeplearning4j" % "deeplearning4j-core" % "0.4-rc3.4"
)}
error message:
error: illegal start of simple expression
object BuildScript extends Build {
^
[error] Error parsing expression. Ensure that there are no blank lines within a setting.
我认为这个帖子实际上解释了它:What is the difference between build.sbt and build.scala?
我觉得 chris martin 对这篇文章的编辑是不必要的,但不能拒绝。
【问题讨论】: