Skip to content

Commit 4cf0393

Browse files
committed
Add OSGi headers.
Fixed #1.
1 parent 43c1f5d commit 4cf0393

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

build.sbt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ organization := "org.scala-lang.modules"
22

33
name := "scala-xml"
44

5-
version := "1.0-RC4"
5+
version := "1.0.0-RC4"
66

77
// standard stuff follows:
88
scalaVersion := "2.11.0-M5"
@@ -105,6 +105,24 @@ definedTests in Test += (
105105
}, true, Array())
106106
)
107107

108+
osgiSettings
109+
110+
val osgiVersion = version(_.replace('-', '.'))
111+
112+
OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}"
113+
114+
OsgiKeys.bundleVersion := osgiVersion.value
115+
116+
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}")
117+
118+
// Sources should also have a nice MANIFEST file
119+
packageOptions in packageSrc := Seq(Package.ManifestAttributes(
120+
("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"),
121+
("Bundle-Name", s"${name.value} sources"),
122+
("Bundle-Version", osgiVersion.value),
123+
("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""")
124+
))
125+
108126

109127
// TODO: mima
110128
// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0")

0 commit comments

Comments
 (0)