From 24ff9cfc0615aa3799b9093f11bf6114735d9ef6 Mon Sep 17 00:00:00 2001 From: "Klare, Heiko" Date: Tue, 19 May 2026 18:15:41 +0200 Subject: [PATCH] Add capabilities to Skija libraries to enforce loading fragment Skija fragment contain the actual native libraries for adopting Skia. Those fragments currently need to be explicitly pulled into an OSGi environment to make use of Skija, as the skija-shared library effectly depends on the presence of either of the fragments with the native libraries. This change adds OSGi capabilities to the Skija libraries, such that the skija-shared host always requires one of the fragments to be present. This leads to the fitting fragment for the current platform automatically being pulled into a launch if available. --- maven-bnd/tp/MavenBND.target | 5 +++-- maven-sign/tp/MavenSign.target | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/maven-bnd/tp/MavenBND.target b/maven-bnd/tp/MavenBND.target index fafa911..ccc9269 100644 --- a/maven-bnd/tp/MavenBND.target +++ b/maven-bnd/tp/MavenBND.target @@ -235,7 +235,7 @@ Export-Package: *;version="${version}";-noimport:=true - + This feature's dependencies are pulled directly from Maven central and wrapped via BND recipe as OSGi artifacts. Copyright (c) 2026 Eclipse contributors and others. @@ -263,8 +263,9 @@ SPDX-License-Identifier: EPL-2.0 Bundle-Name: Bundle ${mvnGroupId} : ${mvnArtifactId} version: ${versionmask;===;${version_cleanup;${mvnVersion}}} Bundle-SymbolicName: ${mvnGroupId}.${mvnArtifactId} -Bundle-Version: ${version}.v20260519-1000 +Bundle-Version: ${version}.v20260519-1800 Eclipse-Wrapped-Bundle: ${mvnGroupId}:${mvnArtifactId}:${mvnVersion} +Require-Capability: ${mvnGroupId}.skija;filter:="(library=native)" Import-Package: * Export-Package: *;version="${version}";-noimport:=true -noextraheaders: true diff --git a/maven-sign/tp/MavenSign.target b/maven-sign/tp/MavenSign.target index e516ab3..eee20af 100644 --- a/maven-sign/tp/MavenSign.target +++ b/maven-sign/tp/MavenSign.target @@ -84,7 +84,7 @@ Bundle-Version: ${version}.v20251001-0800 - + This feature's dependencies are pulled directly from Maven central and wrapped via BND recipe as OSGi artifacts. Copyright (c) 2026 Eclipse contributors and others. @@ -137,10 +137,11 @@ SPDX-License-Identifier: EPL-2.0 version: ${versionmask;===;${version_cleanup;${mvnVersion}}} # Bundles that match this pattern will be updated to use this qualifier. # bundle-pattern: io.github.humbleui.skija-(linux|macos|windows)-(x64|arm64)(.source)? -Bundle-Version: ${version}.v20260519-1000 +Bundle-Version: ${version}.v20260519-1800 Bundle-Name: Bundle ${mvnGroupId} : ${mvnArtifactId} Bundle-SymbolicName: ${mvnGroupId}.${mvnArtifactId} Eclipse-Wrapped-Bundle: ${mvnGroupId}:${mvnArtifactId}:${mvnVersion} +Provide-Capability: ${mvnGroupId}.skija;library="native";version:Version="1.0" Fragment-Host: io.github.humbleui.skija-shared;bundle-version="${range;[==,+);${version}}" os: ${replacestring;${replacestring;${replacestring;${mvnArtifactId};.*-macos-.*;macosx};.*-linux-.*;linux};.*-windows-.*;win32} arch: ${replacestring;${replacestring;${mvnArtifactId};.*-arm64.*;aarch64};.*-x64.*;x86_64}