Title: Restore OSGi manifest headers in the published jar by RedN4ks · Pull Request #4548 · graphql-java/graphql-java · GitHub
Open Graph Title: Restore OSGi manifest headers in the published jar by RedN4ks · Pull Request #4548 · graphql-java/graphql-java
X Title: Restore OSGi manifest headers in the published jar by RedN4ks · Pull Request #4548 · graphql-java/graphql-java
Description: Fixes #4547 Since the Gradle 9 upgrade (4db3cc4, #4171), the bnd configuration for shadowJar is skipped silently. The bnd builder plugin only adds BundleTaskExtension to the jar task, so extensions.findByType(BundleTaskExtension) returns null on shadowJar, and the buildBundle() step that used to run bnd was dropped. As a result, 26.0 and 26.1 were published without OSGi headers. Changes On shadowJar, create the BundleTaskExtension and register bundle.buildAction(), the bnd Gradle plugin's documented pattern for tasks other than jar. The existing bnd instructions are unchanged. Set Bundle-SymbolicName and Bundle-Name to graphql-java explicitly. Otherwise bnd derives them from the archive name, which now includes the shadow classifier. Add a verifyOsgiManifest task to check that fails if the published jar has the wrong Bundle-SymbolicName, no Bundle-Version, doesn't export graphql, still has Private-Package, or imports the shaded Guava or ANTLR packages. Verification ./gradlew assemble and ./gradlew check -x test -x testng pass. The manifest of build/libs/graphql-java-*.jar has the same shape as 25.1: Bundle-SymbolicName: graphql-java, Export-Package: graphql;..., and imports limited to java.*, org.dataloader, org.reactivestreams and optional org.jspecify.annotations. With the shadowJar change reverted, verifyOsgiManifest fails (missing Bundle-SymbolicName, Bundle-Version, Export-Package). In Apache Felix 7.0.5, with java-dataloader 6.0.0, reactive-streams and jspecify installed, a bundle importing graphql and graphql.schema: doesn't resolve against 26.1 (missing requirement osgi.wiring.package=graphql) resolves and becomes ACTIVE against the jar built from this branch.
Open Graph Description: Fixes #4547 Since the Gradle 9 upgrade (4db3cc4, #4171), the bnd configuration for shadowJar is skipped silently. The bnd builder plugin only adds BundleTaskExtension to the jar task, so extensions...
X Description: Fixes #4547 Since the Gradle 9 upgrade (4db3cc4, #4171), the bnd configuration for shadowJar is skipped silently. The bnd builder plugin only adds BundleTaskExtension to the jar task, so extensions...
Opengraph URL: https://github.com/graphql-java/graphql-java/pull/4548
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:88030515-f601-b99e-4d95-038560dc7891 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B436:ADA9D:26D77C4:31D9CC0:6B0188E5 |
| html-safe-nonce | 9ef089be653396526fe2170dc1747228617f60ae78ea3e55cb224373ba6f4628 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDM2OkFEQTlEOjI2RDc3QzQ6MzFEOUNDMDo2QjAxODhFNSIsInZpc2l0b3JfaWQiOiIzODg2NjE0MTM4MTQyNjg5NTA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 96ffc58155d4f3d29e9795dadb973439f575647a52fa86e412eef833da49327b |
| hovercard-subject-tag | pull_request:5239873647 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/graphql-java/graphql-java/pull/4548/files |
| twitter:image | https://avatars.githubusercontent.com/u/47701022?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/47701022?s=400&v=4 |
| og:image:alt | Fixes #4547 Since the Gradle 9 upgrade (4db3cc4, #4171), the bnd configuration for shadowJar is skipped silently. The bnd builder plugin only adds BundleTaskExtension to the jar task, so extensions... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git |
| octolytics-dimension-user_id | 14289921 |
| octolytics-dimension-user_login | graphql-java |
| octolytics-dimension-repository_id | 38602457 |
| octolytics-dimension-repository_nwo | graphql-java/graphql-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38602457 |
| octolytics-dimension-repository_network_root_nwo | graphql-java/graphql-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width