Project Run Play from sbt

I'm going to publish a Play project for github, but I would like Scala developers not to have to install the game separately if they already have sbt installed.

Is it possible to compile and run the Play project with sbt if we add the correct dependencies?

My work build.sbt for Play is here, but it does not 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

Thank!

+4
source share
1 answer

You just have to add the following line to the file project/plugins.sbt:

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3") // or your play version

play new does it by default.

You can check if the project is executable sbt by executing sbt runfrom the terminal.

+9
source

Source: https://habr.com/ru/post/1542140/


All Articles