Skip to content

Document that excluded dependencies are not added to shadow configuration - #2344

Merged
Goooler merged 1 commit into
mainfrom
g/20261025/doc-excluded-deps-publishing
Oct 25, 2026
Merged

Goooler merged 1 commit into
mainfrom
g/20261025/doc-excluded-deps-publishing

Conversation

@Goooler

@Goooler Goooler commented Oct 25, 2026

Copy link
Copy Markdown
Member

Closes #265.

…tion

Explain why dependencies excluded by the ShadowJar dependency filter are not exposed to consumers, and how to declare them in the `shadow` configuration explicitly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation and test assertions match existing behavior, with no unresolved findings or production-code changes.

No open issues 🎉

What changed in this PR

This PR addresses #265 by documenting why excluded dependencies are not automatically added to the shadow configuration and how to declare them explicitly for consumers. It documents existing behavior without changing production code.

Changes:

  • Adds Kotlin and Groovy examples for keeping a transitive dependency external.
  • Links publishing guidance to the new excluded-dependency documentation.
  • Adds a functional test covering JAR contents, manifest classpath, POM dependencies, and Gradle Module Metadata.
File Description
src/​functionalTest/​kotlin/​com/​github/​jengelman/​gradle/​plugins/​shadow/​PublishingTest.kt Tests publishing with an explicitly declared external dependency.
docs/​publishing/​README.md Links to guidance for declaring excluded dependencies.
docs/​configuration/​dependencies/​README.md Explains exclusion behavior and provides explicit shadow dependency examples.

Review effort: Balanced

@Goooler
Goooler merged commit 6123537 into main Oct 25, 2026
16 checks passed
@Goooler
Goooler deleted the g/20261025/doc-excluded-deps-publishing branch October 25, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add excluded dependencies to the shadow configuration automatically

2 participants