Skip to content

Commit dc0110f

Browse files
author
Mathias Bogaert
committed
Split up scalariform config from build.sbt in scalariform.sbt. Disable marco warning. Fix osgi.
1 parent 128738c commit dc0110f

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

build.sbt

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
import com.typesafe.sbt.osgi.SbtOsgi._
2-
import com.typesafe.sbt.SbtScalariform
3-
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
41
import com.typesafe.sbt.osgi.SbtOsgi
52

6-
import scalariform.formatter.preferences.{AlignSingleLineCaseStatements, DoubleIndentClassDeclaration}
7-
83
enablePlugins(SbtOsgi)
94

10-
name := "scala-logging"
115
organization := "com.typesafe.scala-logging"
6+
name := "scala-logging"
127
licenses := Seq("Apache 2.0 License" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
138
homepage := Some(url("https://github.com/typesafehub/scala-logging"))
9+
incOptions := incOptions.value.withLogRecompileOnMacro(false)
1410
scalaVersion := Version.scala
1511
crossScalaVersions := Version.crossScala
1612
scalacOptions ++= List(
@@ -22,26 +18,14 @@ scalacOptions ++= List(
2218

2319
osgiSettings
2420

25-
OsgiKeys.bundleSymbolicName := s"com.typesafe.scalalogging"
26-
OsgiKeys.exportPackage := Seq(s"com.typesafe.scalalogging.*;version=${version.value}")
27-
28-
packageBin in Runtime <<= OsgiKeys.bundle
29-
packagedArtifact in (Compile, packageBin) <<= (artifact in (Compile, packageBin), OsgiKeys.bundle).identityMap
30-
31-
unmanagedSourceDirectories in Compile := List((scalaSource in Compile).value)
32-
unmanagedSourceDirectories in Test := List((scalaSource in Test).value)
21+
OsgiKeys.bundleSymbolicName := "com.typesafe.scala-logging"
22+
OsgiKeys.privatePackage := Seq()
23+
OsgiKeys.exportPackage := Seq("com.typesafe.scalalogging*")
3324

3425
releaseVersionBump := sbtrelease.Version.Bump.Minor
3526
releaseCrossBuild := true
3627
releasePublishArtifactsAction := PgpKeys.publishSigned.value
3728

38-
SbtScalariform.scalariformSettings
39-
40-
ScalariformKeys.preferences := ScalariformKeys.preferences.value
41-
.setPreference(AlignSingleLineCaseStatements, true)
42-
.setPreference(AlignSingleLineCaseStatements.MaxArrowIndent, 100)
43-
.setPreference(DoubleIndentClassDeclaration, true)
44-
4529
libraryDependencies ++= Dependencies.scalaLogging(scalaVersion.value)
4630

4731
initialCommands := """|import com.typesafe.scalalogging._

scalariform.sbt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
2+
import scalariform.formatter.preferences.{AlignSingleLineCaseStatements, DoubleIndentClassDeclaration}
3+
4+
scalariformSettings
5+
6+
ScalariformKeys.preferences := ScalariformKeys.preferences.value
7+
.setPreference(AlignSingleLineCaseStatements, true)
8+
.setPreference(AlignSingleLineCaseStatements.MaxArrowIndent, 100)
9+
.setPreference(DoubleIndentClassDeclaration, true)

0 commit comments

Comments
 (0)