问题
I'm unable to reference the object Dependencies from within plugins.sbt
on compile getting the error error: not found: value Dependencies
/project/plugins.sbt
/project/Dependencies.sbt
Depencies.scala
is just a collection of objects
object Dependencies {
object Play {
...
val sbtPlugin = "..."
...
Similarly I use it in ./build.sbt
to add libraryDependencies
without problems:
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(libraryDependencies += Seq(
Dependencies.Play.dependencies, ...
Thanks for any ideas, I'm curious more than anything why build.sbt
can access project
folder resources
回答1:
If you want a dependencies files to be accessible from project/plugins.sbt
then you need to put it into project/project/Dependencies.scala
.
(I'm assuming your file is called Dependencies.scala
, not Dependencies.sbt
or Depencies.scala
as shown in your question.)
In general somedir/*.sbt
files can access .scala
files in somedir/project/*.scala
.
来源:https://stackoverflow.com/questions/47143350/project-dependencies-scala-not-accessible-from-plugins-sbt