diff --git a/build.sbt b/build.sbt index 026af3434..e9040beff 100644 --- a/build.sbt +++ b/build.sbt @@ -2,6 +2,7 @@ // update NEWS, update version in README.md, tag, then // publishSigned. // Release tags should follow: http://semver.org/ +import scalariform.formatter.preferences._ enablePlugins(GitVersioning) git.baseVersion := "1.3.0" @@ -22,7 +23,10 @@ val sonatype = new PublishToSonatype { } lazy val commonSettings: Seq[Setting[_]] = Def.settings( - unpublished + unpublished, + scalariformPreferences := scalariformPreferences.value + .setPreference(IndentSpaces, 4) + .setPreference(FirstArgumentOnNewline, Preserve) ) lazy val root = (project in file(".")) @@ -49,7 +53,10 @@ lazy val configLib = Project("config", file("config")) publish := sys.error("use publishSigned instead of plain publish"), publishLocal := sys.error("use publishLocalSigned instead of plain publishLocal"), packageOptions in (Compile, packageBin) += - Package.ManifestAttributes("Automatic-Module-Name" -> "typesafe.config" ) + Package.ManifestAttributes("Automatic-Module-Name" -> "typesafe.config" ), + scalariformPreferences := scalariformPreferences.value + .setPreference(IndentSpaces, 4) + .setPreference(FirstArgumentOnNewline, Preserve) ) .enablePlugins(SbtOsgi) .dependsOn(testLib % "test->test") diff --git a/config/build.sbt b/config/build.sbt index 8b5c49e76..59e80a43a 100644 --- a/config/build.sbt +++ b/config/build.sbt @@ -1,13 +1,3 @@ -import com.typesafe.sbt.SbtScalariform -import com.typesafe.sbt.SbtScalariform.ScalariformKeys -import scalariform.formatter.preferences._ - -val formatPrefs = FormattingPreferences() - .setPreference(IndentSpaces, 4) - -ScalariformKeys.preferences in Compile := formatPrefs -ScalariformKeys.preferences in Test := formatPrefs - fork in test := true fork in Test := true fork in run := true