I am about to publish a Play project to github, but I would like that Scala developers don't need to install play separately if they already have sbt installed.
Would it be possible to compile and run a Play project with sbt if we add the correct dependencies ?
My working build.sbt for Play is here, but it doesn't work with sbt.
import play.Project._
name := "my_project_name"
version := "1.0"
libraryDependencies ++= Seq(
"com.netflix.rxjava" % "rxjava-scala" % "0.17.4",
"oauth.signpost" % "signpost-core" % "1.2.1.2",
"oauth.signpost" % "signpost-commonshttp4" % "1.2.1.2",
"org.apache.httpcomponents" % "httpclient" % "4.3.3",
"commons-io" % "commons-io" % "2.3"
)
playScalaSettings
Thanks!
You just should add the following line to project/plugins.sbt
file:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3") // or your play version
play new
does this by default.
You may check if the project is executable by sbt by executing sbt run
from the terminal.
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