From 831ff60687eae8e7a7379cd7a9e8dab78582c9a4 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Thu, 12 Oct 2023 11:29:12 +0200 Subject: [PATCH] Fix OSGI protobuf bug (cherry picked from commit c5611ec0d812c8a7e8a4587c5a7a2451b8eaaa97) --- project/OSGi.scala | 4 +++- project/plugins.sbt | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/project/OSGi.scala b/project/OSGi.scala index e3e8946199e..e41e358dbfc 100644 --- a/project/OSGi.scala +++ b/project/OSGi.scala @@ -40,7 +40,9 @@ object OSGi { OsgiKeys.privatePackage := Seq(), // Explicitly specify the version of JavaSE required #23795 (rather depend on // figuring that out from the JDK it was built with) - OsgiKeys.requireCapability := "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version>=1.8))\"") + OsgiKeys.requireCapability := "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version>=1.8))\"", + // Recent versions of BND create corrupted jars so use JDK jar instead, see https://github.com/sbt/sbt-osgi/pull/81 + OsgiKeys.packageWithJVMJar := true) val actor = osgiSettings ++ Seq( OsgiKeys.exportPackage := Seq("org.apache.pekko*"), diff --git a/project/plugins.sbt b/project/plugins.sbt index e7e17143b87..02091a9a74b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -13,9 +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.9.33") -// sbt-osgi 0.9.5 is available but breaks including jdk9-only classes -// sbt-osgi 0.9.6 is available but breaks populating pekko-protobuf-v3 -addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4") +addSbtPlugin("com.github.sbt" % "sbt-osgi" % "0.9.7") 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")