diff --git a/build.sbt b/build.sbt index 79775d95..f92b1949 100644 --- a/build.sbt +++ b/build.sbt @@ -9,3 +9,8 @@ version := "1.0.0-SNAPSHOT" scalaVersion := "2.11.0-M7" snapshotScalaBinaryVersion := "2.11.0-M7" + +// important!! must come here (why?) +osgiSettings + +OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") diff --git a/standard.sbt b/standard.sbt index 11509aba..55a3fb4f 100644 --- a/standard.sbt +++ b/standard.sbt @@ -22,10 +22,6 @@ resourceGenerators in Compile <+= Def.task { Seq(file) } -mappings in (Compile, packageBin) += { - (baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties" -} - // maven publishing publishTo := { @@ -71,3 +67,17 @@ pomExtra := ( ) + +val osgiVersion = version(_.replace('-', '.')) + +OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" + +OsgiKeys.bundleVersion := osgiVersion.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:="."""") + )) \ No newline at end of file