Why does sbt report “not found: value PlayScala” with Build.scala while build.sbt works?

前端 未结 1 788
遥遥无期
遥遥无期 2021-02-20 06:15

I am creating a multi-module sbt project, with following structure:


----build.sbt
----project
    ----Build.scala
    ----plugins.sbt
----common
-         


        
1条回答
  •  無奈伤痛
    2021-02-20 06:34

    It's just a missing import.

    In .sbt files, some things are automatically imported by default: contents of objects extending Plugin, and (>= 0.13.5) autoImport fields in AutoPlugins. This is the case of PlayScala.

    In a Build.scala file, normal Scala import rules apply. So you have to import things a bit more explicitly. In this case, you need to import play.PlayScala (or use .enabledPlugins(play.PlayScala) directly).

    0 讨论(0)
提交回复
热议问题