Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ libraryDependencies ++=

enablePlugins(SbtOsgi)

// Add Enable-Native-Access manifest attribute for JDK 24+ (JEP 472)
packageOptions := Seq(
Package.ManifestAttributes("Enable-Native-Access" -> "ALL-UNNAMED")
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this might work in the current configuration, using := overwrites any previously defined package options. It is safer and more idiomatic in sbt to append to sequence-based settings like packageOptions using ++=. This will prevent potential conflicts with other plugins (like the sbt-osgi plugin enabled in this project) or other settings that might also be adding manifest attributes.

packageOptions ++= Seq(
  Package.ManifestAttributes("Enable-Native-Access" -> "ALL-UNNAMED")
)


osgiSettings

OsgiKeys.exportPackage :=
Expand Down
Loading