11import de .johoop .findbugs4sbt .ReportType
22import ReleaseTransformations ._
33
4- val buildSettings = findbugsSettings ++ jacoco.settings ++ Seq [Setting [_]](
4+ val buildSettings = findbugsSettings ++ jacoco.settings ++ osgiSettings ++ Seq [Setting [_]](
55 organization := " org.msgpack" ,
66 organizationName := " MessagePack" ,
77 organizationHomepage := Some (new URL (" http://msgpack.org/" )),
@@ -28,6 +28,8 @@ val buildSettings = findbugsSettings ++ jacoco.settings ++ Seq[Setting[_]](
2828 opts
2929 }
3030 },
31+ // OSGi settings
32+ OsgiKeys .importPackage := Seq (""" org.osgi.framework;version="[1.5,2)"""" ),
3133 // Release settings
3234 releaseTagName := { (version in ThisBuild ).value },
3335 releaseProcess := Seq [ReleaseStep ](
@@ -79,6 +81,13 @@ lazy val msgpackCore = Project(id = "msgpack-core", base = file("msgpack-core"))
7981 .settings(
8082 buildSettings,
8183 description := " Core library of the MessagePack for Java" ,
84+ OsgiKeys .exportPackage := Seq (
85+ // TODO enumerate used packages automatically
86+ " org.msgpack.core" ,
87+ " org.msgpack.core.annotations" ,
88+ " org.msgpack.core.buffer" ,
89+ " org.msgpack.value"
90+ ),
8291 libraryDependencies ++= Seq (
8392 // msgpack-core should have no external dependencies
8493 junitInterface,
@@ -96,10 +105,12 @@ lazy val msgpackJackson = Project(id = "msgpack-jackson", base = file("msgpack-j
96105 buildSettings,
97106 name := " jackson-dataformat-msgpack" ,
98107 description := " Jackson extension that adds support for MessagePack" ,
108+ OsgiKeys .exportPackage := Seq (" org.msgpack.jackson" , " org.msgpack.jackson.dataformat" ),
99109 libraryDependencies ++= Seq (
100110 " com.fasterxml.jackson.core" % " jackson-databind" % " 2.7.1" ,
101111 junitInterface,
102112 " org.apache.commons" % " commons-math3" % " 3.4.1" % " test"
103113 ),
104114 testOptions += Tests .Argument (TestFrameworks .JUnit , " -v" )
105115 ).dependsOn(msgpackCore)
116+
0 commit comments