Skip to content

Commit 8c1deff

Browse files
committed
Add Osgi settings
1 parent 0df9e35 commit 8c1deff

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

build.sbt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import de.johoop.findbugs4sbt.ReportType
22
import 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+

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6")
1111

1212
addSbtPlugin("org.xerial.sbt" % "sbt-jcheckstyle" % "0.1.2")
1313

14+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.7.0")
15+
1416
scalacOptions ++= Seq("-deprecation", "-feature")

0 commit comments

Comments
 (0)