Skip to content

fix: Configure shadow jar as main artifact for fat jar modules#274

Open
fireboy1919 wants to merge 1 commit intoairbnb:mainfrom
fireboy1919:fix-shadow-jar-publishing
Open

fix: Configure shadow jar as main artifact for fat jar modules#274
fireboy1919 wants to merge 1 commit intoairbnb:mainfrom
fireboy1919:fix-shadow-jar-publishing

Conversation

@fireboy1919
Copy link
Copy Markdown
Collaborator

Summary

  • Fix shadow jar publishing so standalone consumers get the fat jar instead of the empty thin jar
  • Configure apiElements and runtimeElements variants to use the shadow jar artifact
  • Remove the isCompositeBuild conditional logic (no longer needed with proper fat jar publishing)
fix: Configure shadow jar as main artifact for fat jar modules

The shadow plugin was building fat jars correctly, but Gradle's apiElements and
runtimeElements variants were still pointing to the thin jar. This caused standalone
consumers to get an empty jar instead of the fat jar with bundled classes.

Test Plan

  • Verified composite mode works: ./gradlew :cli-starter:test :jetty-starter:test
  • Verified standalone mode works with mavenLocal (per RELEASE-RUNBOOK.md instructions)
  • Verified published module metadata now points to fat jar instead of thin jar

The shadow plugin was building fat jars correctly, but Gradle's
apiElements and runtimeElements variants were still pointing to
the thin jar. This caused standalone consumers to get an empty
jar instead of the fat jar with bundled classes.

Fix by configuring apiElements and runtimeElements to use the
shadow jar artifact directly. The isCompositeBuild logic is
preserved to keep internal dependencies as implementation scope
in published POMs.
@fireboy1919 fireboy1919 force-pushed the fix-shadow-jar-publishing branch from b59f86d to 24cd66d Compare January 26, 2026 13:21
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.

1 participant