Skip to content

Commit

Permalink
Fix the OSGI version string
Browse files Browse the repository at this point in the history
  • Loading branch information
luben committed Oct 31, 2023
1 parent d375fdf commit 323c17d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ licenses := Seq("BSD 2-Clause License" -> url("https://opensource.org/licenses/B
description := "JNI bindings for Zstd native library that provides fast and high " +
"compression lossless algorithm for Java and all JVM languages."

osgiVersion := version.value.replace("-", ".")

Compile / packageBin / packageOptions ++= Seq(
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Automatic-Module-Name") -> "com.github.luben.zstd_jni"),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bnd-LastModified") -> s"${java.lang.System.currentTimeMillis()}"),
Expand All @@ -169,7 +171,7 @@ Compile / packageBin / packageOptions ++= Seq(
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-Description") -> description.value),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-Vendor") -> organization.value),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-License") -> "https://opensource.org/licenses/BSD-2-Clause;description=BSD 2-Clause License"),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-Version") -> version.value),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-Version") -> osgiVersion.value),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-ManifestVersion") -> version.value),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Bundle-NativeCode") ->
s"""darwin/x86_64/libzstd-jni-${version.value}.dylib;osname=MacOS;osname=MacOSX;processor=x86_64,
Expand All @@ -189,7 +191,7 @@ Compile / packageBin / packageOptions ++= Seq(
|win/amd64/libzstd-jni-${version.value}.dll;osname=Win32;processor=amd64,
|win/aarch64/libzstd-jni-${version.value}.dll;osname=Win32;processor=aarch64,
|win/x86/libzstd-jni-${version.value}.dll;osname=Win32;processor=x86""".stripMargin.replace("\n", "")),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Export-Package") -> s"""com.github.luben.zstd;version="${version.value}",com.github.luben.zstd.util;version="${version.value}""""),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Export-Package") -> s"""com.github.luben.zstd;version="${osgiVersion.value}",com.github.luben.zstd.util;version="${osgiVersion.value}""""),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Import-Package") -> "org.osgi.framework;resolution:=optional"),
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Private-Package") ->
"""darwin.aarch64,
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.5-7
1.5.5-8

0 comments on commit 323c17d

Please sign in to comment.