in a Playframework 2 App (2.2.x) there is a build.sbt file. In this file one should specify the dependencies the app has.
Some docs write about
val appDependencies = Seq(put dependencies here)
and in the default there is a
libraryDependencies ++= Seq(put dependencies here)
When to take what? What is the difference between appDependencies and libraryDependencies?
Cheers
I guess you are mixing up sbt build.sbt
and Build.scala
definitions (see sbt Build definition).
libraryDependencies
is a key defined by sbt you can use in build.sbt
files (which are basically key-value-stores). However, there is no predefined appDependencies
key.
The example you gave
val appDependencies = Seq(put dependencies here)
is just a vanilla variable that could have any arbitrary name. You could as well name it dependenciesForTehLulz
. The reason is that this variable is used to pass the dependencies to the Project definition constructor later, and its name simply doesn't matter:
val main = play.Project(appName, appVersion, **appDependencies**).settings(
...
)
This is only possible in Build.scala
-style project definitions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With