Permalink
Browse files

Added SBT-OSGi to allow Parboiled2 to generate an OSGi valid JAR arti…

…fact on publish or publishLocal, this allowed Parboiled2 to be used within an OSGi environment. Look at the file MANIFEST.MF inside the artifact JAR (result of publishLocal) before and after this change was added to see the changes. The changes are that there are import and export packages defined there.
  • Loading branch information...
PhilAndrew committed Mar 1, 2017
1 parent 2d0f683 commit 5aade43edf2c9af4a166ace7675d4c26d3aca13f
Showing with 9 additions and 1 deletion.
  1. +7 −1 build.sbt
  2. +2 −0 project/plugins.sbt
View
@@ -108,6 +108,11 @@ lazy val scalaParser = project
.settings(noPublishingSettings: _*)
.settings(libraryDependencies ++= Seq(shapeless, specs2Core))
lazy val parboiledOsgiSettings = osgiSettings ++ Seq(
OsgiKeys.exportPackage := Seq("org.parboiled2.*;version=${Bundle-Version}"),
OsgiKeys.privatePackage := Seq()
)
lazy val parboiled = crossProject.crossType(CrossType.Pure)
.dependsOn(parboiledCore)
.settings(commonSettings: _*)
@@ -133,7 +138,8 @@ lazy val parboiled = crossProject.crossType(CrossType.Pure)
}
new RuleTransformer(filter).transform(_).head
}
)
).
enablePlugins(SbtOsgi).settings(parboiledOsgiSettings:_*)
lazy val parboiledJVM = parboiled.jvm
lazy val parboiledJS = parboiled.js
View
@@ -5,3 +5,5 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.20")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")

0 comments on commit 5aade43

Please sign in to comment.