11import com .typesafe .sbt .osgi .SbtOsgi ._
2+ import com .typesafe .sbt .SbtScalariform
3+ import com .typesafe .sbt .SbtScalariform .ScalariformKeys
4+ import com .typesafe .sbt .osgi .SbtOsgi
25
3- lazy val scalaLogging = project in file( " . " )
6+ import scalariform . formatter . preferences .{ AlignSingleLineCaseStatements , DoubleIndentClassDeclaration }
47
5- name := " scala-logging "
8+ enablePlugins( SbtOsgi )
69
7- Common .settings ++ defaultOsgiSettings ++ Seq (
8- packageBin in Runtime <<= OsgiKeys .bundle,
9- packagedArtifact in (Compile , packageBin) <<= (artifact in (Compile , packageBin), OsgiKeys .bundle).identityMap,
10- OsgiKeys .exportPackage := Seq (" com.typesafe.scalalogging" )
10+ name := " scala-logging"
11+ organization := " com.typesafe.scala-logging"
12+ licenses := Seq (" Apache 2.0 License" -> url(" http://www.apache.org/licenses/LICENSE-2.0.html" ))
13+ homepage := Some (url(" https://github.com/typesafehub/scala-logging" ))
14+ scalaVersion := Version .scala
15+ crossScalaVersions := Version .crossScala
16+ scalacOptions ++= List (
17+ " -unchecked" ,
18+ " -deprecation" ,
19+ " -language:_" ,
20+ " -encoding" , " UTF-8"
1121)
1222
23+ osgiSettings
24+
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)
33+
34+ releaseVersionBump := sbtrelease.Version .Bump .Minor
35+ releaseCrossBuild := true
36+ releasePublishArtifactsAction := PgpKeys .publishSigned.value
37+
38+ SbtScalariform .scalariformSettings
39+
40+ ScalariformKeys .preferences := ScalariformKeys .preferences.value
41+ .setPreference(AlignSingleLineCaseStatements , true )
42+ .setPreference(AlignSingleLineCaseStatements .MaxArrowIndent , 100 )
43+ .setPreference(DoubleIndentClassDeclaration , true )
44+
1345libraryDependencies ++= Dependencies .scalaLogging(scalaVersion.value)
1446
1547initialCommands := """ |import com.typesafe.scalalogging._
1648 |import org.slf4j.{ Logger => Underlying, _ }""" .stripMargin
49+
50+ publishTo <<= isSnapshot(isSnapshot => Some (if (isSnapshot) Opts .resolver.sonatypeSnapshots else Opts .resolver.sonatypeStaging))
51+ publishArtifact in Test := false
52+ pomIncludeRepository := (_ => false )
53+ pomExtra :=
54+ <scm >
55+ <url >https:// github.com/ typesafehub/ scala- logging</url >
56+ <connection >scm: git: git:// github.com/ typesafehub/ scala- logging.git</connection >
57+ </scm >
58+ <developers >
59+ <developer >
60+ <id >hseeberger</id >
61+ <name >Heiko Seeberger </name >
62+ <url >http:// heikoseeberger.de</url >
63+ </developer >
64+ <developer >
65+ <id >analytically</id >
66+ <name >Mathias Bogaert </name >
67+ <url >http:// twitter.com/ analytically</url >
68+ </developer >
69+ </developers >
0 commit comments