add scalariform sbt plugin with formatting preferences
This commit is contained in:
parent
a60ca6c8d2
commit
bcc0d207ff
|
@ -1,5 +1,8 @@
|
||||||
import play.sbt.Play.autoImport._
|
import play.sbt.Play.autoImport._
|
||||||
import sbt._, Keys._
|
import sbt._, Keys._
|
||||||
|
import com.typesafe.sbt.SbtScalariform
|
||||||
|
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
||||||
|
import scalariform.formatter.preferences._
|
||||||
|
|
||||||
object BuildSettings {
|
object BuildSettings {
|
||||||
|
|
||||||
|
@ -20,7 +23,13 @@ object BuildSettings {
|
||||||
publishArtifact in (Compile, packageDoc) := false,
|
publishArtifact in (Compile, packageDoc) := false,
|
||||||
// disable publishing the main sources jar
|
// disable publishing the main sources jar
|
||||||
publishArtifact in (Compile, packageSrc) := false
|
publishArtifact in (Compile, packageSrc) := false
|
||||||
)
|
) ++
|
||||||
|
SbtScalariform.scalariformSettings ++ Seq(
|
||||||
|
ScalariformKeys.preferences := ScalariformKeys.preferences.value
|
||||||
|
.setPreference(AlignSingleLineCaseStatements, true)
|
||||||
|
.setPreference(CompactControlReadability, true)
|
||||||
|
.setPreference(SpacesAroundMultiImports, true)
|
||||||
|
.setPreference(DanglingCloseParenthesis, Preserve))
|
||||||
|
|
||||||
def defaultDeps = Seq(scalaz, scalalib, jodaTime, ws, java8compat)
|
def defaultDeps = Seq(scalaz, scalalib, jodaTime, ws, java8compat)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
|
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
|
||||||
|
|
||||||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
|
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
|
||||||
|
|
||||||
|
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")
|
||||||
|
|
Loading…
Reference in a new issue