From d33040e2b2fe9cc503279d434425ba3150927599 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Fri, 20 Sep 2013 14:43:02 +0200 Subject: [PATCH] Add OSGi headers and source bundles. Fixed #1. --- build.sbt | 20 +++++++++++++++++++- project/plugins.sbt | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 project/plugins.sbt diff --git a/build.sbt b/build.sbt index ed8799e2..18bf6aa3 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ organization := "org.scala-lang.modules" name := "scala-parser-combinators" -version := "1.0-RC2" +version := "1.0.0-RC2" scalaVersion := "2.11.0-M5" @@ -103,6 +103,24 @@ definedTests in Test += ( }, true, Array()) ) +osgiSettings + +val osgiVersion = version(_.replace('-', '.')) + +OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" + +OsgiKeys.bundleVersion := osgiVersion.value + +OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}") + +// Sources should also have a nice MANIFEST file +packageOptions in packageSrc := Seq(Package.ManifestAttributes( + ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), + ("Bundle-Name", s"${name.value} sources"), + ("Bundle-Version", osgiVersion.value), + ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") + )) + // TODO: mima // import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 00000000..c2f7976c --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") \ No newline at end of file