I am newbie in scala and SBT
I started using IDEA with SBT and faced unclear error (Expression type DslEntry must conform to Def.SettingsDefinition in SBT file)
It's very simple empty test project with jetty plugin (example taken from plugin site)
here's plugins.sbt source:
logLevel := Level.Warn
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0")
lazy val root = (project in file(".")). enablePlugins(JettyPlugin). settings( name := "test", scalaVersion := "2.11.7", version := "1.0" )
Updates: The followings are what I know:
The error comes from intellij's sbt plugin https://github.com/JetBrains/intellij-sbt/blob/master/idea-plugin/src/main/scala/org/jetbrains/sbt/language/SbtAnnotator.scala#L41.
The return type of
(project in file(".")).
Project. It is acceptable by sbt plugin.
However, if you use standalone
enablePlugins(JettyPlugin), the return type is different, and it becomes
DslEntry which makes the sbt plugin unhappy. Another way to workaround with that is simply to consume the return type of
enablePlugins. For example:
val foo = enablePlugins(JettyPlugin)