Repository navigation
Conversation
Since the Gradle 9 upgrade (4db3cc4), the bnd configuration for shadowJar was silently skipped: the bnd builder plugin only adds BundleTaskExtension to the 'jar' task, so findByType() returned null on shadowJar, and the buildBundle() action was no longer registered. As a result 26.0 and 26.1 were published without Bundle-SymbolicName / Export-Package. Create the extension on shadowJar explicitly and register its build action, set Bundle-SymbolicName/Bundle-Name to graphql-java (bnd would otherwise derive them from the classified archive name), and add a verifyOsgiManifest check so a missing or wrong OSGi manifest fails the build. Fixes graphql-java#4547
RedN4ks
marked this pull request as ready for review
November 10, 2026 10:41
2 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4547
Since the Gradle 9 upgrade (4db3cc4, #4171), the bnd configuration for
shadowJaris skipped silently. The bnd builder plugin only addsBundleTaskExtensionto thejartask, soextensions.findByType(BundleTaskExtension)returnsnullonshadowJar, and thebuildBundle()step that used to run bnd was dropped. As a result, 26.0 and 26.1 were published without OSGi headers.Changes
shadowJar, create theBundleTaskExtensionand registerbundle.buildAction(), the bnd Gradle plugin's documented pattern for tasks other thanjar. The existing bnd instructions are unchanged.Bundle-SymbolicNameandBundle-Nametographql-javaexplicitly. Otherwise bnd derives them from the archive name, which now includes theshadowclassifier.verifyOsgiManifesttask tocheckthat fails if the published jar has the wrongBundle-SymbolicName, noBundle-Version, doesn't exportgraphql, still hasPrivate-Package, or imports the shaded Guava or ANTLR packages.Verification
./gradlew assembleand./gradlew check -x test -x testngpass.build/libs/graphql-java-*.jarhas the same shape as 25.1:Bundle-SymbolicName: graphql-java,Export-Package: graphql;..., and imports limited tojava.*,org.dataloader,org.reactivestreamsand optionalorg.jspecify.annotations.shadowJarchange reverted,verifyOsgiManifestfails (missingBundle-SymbolicName,Bundle-Version,Export-Package).graphqlandgraphql.schema:missing requirement osgi.wiring.package=graphql)