Skip to content

Commit

Permalink
Use latest sbt-osgi
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jan 9, 2024
1 parent 688eac7 commit 1a726cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ updates.ignore = [
{ groupId = "com.lightbend.paradox", artifactId = "sbt-paradox-project-info" }
{ groupId = "com.lightbend.paradox", artifactId = "sbt-paradox "}
{ groupId = "com.typesafe", artifactId = "ssl-config-core" }
{ groupId = "com.typesafe.sbt", artifactId = "sbt-osgi" }
{ groupId = "com.github.sbt", artifactId = "sbt-osgi" }
{ groupId = "org.agrona", artifactId = "agrona" }
{ groupId = "org.mockito", artifactId = "mockito-core" }
{ groupId = "com.lightbend.sbt", artifactId = "sbt-java-formatter" }
Expand Down
9 changes: 8 additions & 1 deletion project/OSGi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.typesafe.sbt.osgi.OsgiKeys
import com.typesafe.sbt.osgi.SbtOsgi._
import sbt._
import sbt.Keys._
import sbtassembly.AssemblyKeys.assembly
import net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin

object OSGi {
Expand Down Expand Up @@ -80,7 +81,13 @@ object OSGi {
configImport(),
"*"),
OsgiKeys.exportPackage := Seq("org.apache.pekko.protobufv3.internal.*"),
OsgiKeys.privatePackage := Seq("google.protobuf.*"))
OsgiKeys.privatePackage := Seq("google.protobuf.*"),
// Since the jar's generated by sbt-assembly are not added in dependencyClasspath
// we need to manually add it to sbt-osgi so it can pick it up. Note that since this
// is a fully shaded jar from sbt-assembly we don't have to worry about incorrect
// osgi Import-Package header since the protobuf-V3 sbt-project has no real dependencies
// (including typical ones such as scala runtime)
OsgiKeys.explodedJars := Seq(assembly.value))

val jackson = exports(Seq("org.apache.pekko.serialization.jackson.*"))

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("com.github.sbt" % "sbt-osgi" % "0.9.4-INVALID-CEN-JAR-PATCH")
addSbtPlugin("com.github.sbt" % "sbt-osgi" % "0.9.10")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2")
Expand Down

0 comments on commit 1a726cc

Please sign in to comment.