import sbt._ import Keys._ import com.typesafe.sbt.SbtScalariform import com.typesafe.sbt.SbtScalariform.ScalariformKeys import Publish.{settings => publishSettings} import Release.{settings => releaseSettings} import scalariform.formatter.preferences._ object Settings { lazy val basicSettings = seq( scalaVersion := "2.10.3", resolvers ++= Dependencies.resolutionRepos, fork in run := true, scalacOptions := Seq( "-encoding", "utf8", "-g:vars", "-feature", "-unchecked", "-deprecation", "-target:jvm-1.6", "-language:postfixOps", "-language:implicitConversions", "-Xlog-reflective-calls" )) ++ publishSettings ++ releaseSettings lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq( ScalariformKeys.preferences in Compile := formattingPreferences, ScalariformKeys.preferences in Test := formattingPreferences ) def formattingPreferences = FormattingPreferences() .setPreference(RewriteArrowSymbols, true) .setPreference(AlignParameters, true) .setPreference(AlignSingleLineCaseStatements, true) .setPreference(DoubleIndentClassDeclaration, true) }