fix scalariform settings
parent
9f6f553119
commit
91b6c66f4f
10
build.sbt
10
build.sbt
|
@ -1,12 +1,10 @@
|
|||
import com.typesafe.sbt.packager.Keys.scriptClasspath
|
||||
import com.typesafe.sbt.SbtScalariform.autoImport.scalariformFormat
|
||||
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
||||
import com.typesafe.sbt.web.SbtWeb.autoImport._
|
||||
import play.Play.autoImport._
|
||||
import play.sbt.PlayImport._
|
||||
import play.twirl.sbt.Import._
|
||||
import PlayKeys._
|
||||
import scalariform.formatter.preferences._
|
||||
|
||||
import BuildSettings._
|
||||
import Dependencies._
|
||||
|
@ -51,12 +49,8 @@ TwirlKeys.templateImports ++= Seq(
|
|||
)
|
||||
resourceDirectory in Assets := (sourceDirectory in Compile).value / "assets"
|
||||
|
||||
Seq(
|
||||
ScalariformKeys.preferences := ScalariformKeys.preferences.value
|
||||
.setPreference(DanglingCloseParenthesis, Force)
|
||||
.setPreference(DoubleIndentConstructorArguments, true),
|
||||
excludeFilter in scalariformFormat := "*Routes*"
|
||||
)
|
||||
scalariformPreferences := scalariformPrefs(scalariformPreferences.value)
|
||||
excludeFilter in scalariformFormat := "*Routes*"
|
||||
|
||||
lazy val modules = Seq(
|
||||
common, db, rating, user, security, hub, socket,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import com.typesafe.sbt.SbtScalariform.autoImport.scalariformPreferences
|
||||
import play.sbt.Play.autoImport._
|
||||
import sbt._, Keys._
|
||||
import scalafix.sbt.ScalafixPlugin.scalafixScalacOptions
|
||||
|
@ -20,9 +21,14 @@ object BuildSettings {
|
|||
// disable publishing the main API jar
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
// disable publishing the main sources jar
|
||||
publishArtifact in (Compile, packageSrc) := false
|
||||
publishArtifact in (Compile, packageSrc) := false,
|
||||
scalariformPreferences := scalariformPrefs(scalariformPreferences.value)
|
||||
)
|
||||
|
||||
def scalariformPrefs(prefs: IFormattingPreferences) = prefs
|
||||
.setPreference(DanglingCloseParenthesis, Force)
|
||||
.setPreference(DoubleIndentConstructorArguments, true)
|
||||
|
||||
def defaultDeps = Seq(scalaz, chess, scalalib, jodaTime, ws, java8compat, specs2)
|
||||
|
||||
def compile(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "compile")
|
||||
|
|
Loading…
Reference in New Issue