mirror of
https://github.com/lightbend/config.git
synced 2025-02-19 07:40:31 +08:00
Scalariform settings in root build.sbt
This commit is contained in:
parent
8cf5c7a546
commit
207f6e993b
11
build.sbt
11
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")
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user