Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude Dagger tracking file from shaded JAR #659

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

Donnerbart
Copy link
Contributor

@Donnerbart Donnerbart commented Dec 3, 2024

Description

Fixes #651

Tested locally with JDK 8 and ./gradlew shadowJar.

Related Issue

The shadow plugin needs to be updated for the exclusion to work, see GradleUp/shadow#505 (6.x is the last major version to work with our Gradle version)

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

@Donnerbart Donnerbart self-assigned this Dec 3, 2024
@cla-bot cla-bot bot added the cla-signed label Dec 3, 2024
@Donnerbart Donnerbart requested a review from LukasBrand December 3, 2024 11:19
build.gradle.kts Outdated Show resolved Hide resolved
@Donnerbart Donnerbart force-pushed the improvement/improve-shadow-jar branch from 3bec062 to 9a9b85b Compare December 3, 2024 13:17
@Donnerbart Donnerbart merged commit 6420427 into master Dec 3, 2024
2 checks passed
@Donnerbart Donnerbart deleted the improvement/improve-shadow-jar branch December 3, 2024 13:21
@maikelvdh
Copy link

Thanks a lot @Donnerbart for taking this change along ❤️ !

@maikelvdh
Copy link

@Donnerbart noticed that in version 1.3.4 there are few more new files to consider excluding in the shaded jar which are potentially problematic namely and not are accounting for relocation: META-INF/annotations.kotlin_module and META-INF/versions/9/module-info.class.

Additionally you might want to consider exclude META-INF/maven/**, META-INF/native-image/** and META-INF/services/** as they seem to be not accounting for the relocation which is applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclusion of dagger version tracking file in shaded library
4 participants