Build: avoid empty directories in JARs - #5487
Draft
ajantha-bhat wants to merge 1 commit into
Draft
Conversation
ajantha-bhat
commented
Sep 10, 2026
| @@ -222,16 +222,12 @@ tasks.withType<Jar>().configureEach { | |||
|
|
|||
| if (!project.file("src/main/no-license-notice-marker").exists()) { | |||
| if (!project.file("src/main/resources/META-INF/LICENSE").exists()) { | |||
Member
Author
There was a problem hiding this comment.
Found during polaris tools release
Member
Author
|
I will take a look at flaky test later. |
ajantha-bhat
marked this pull request as draft
September 10, 2026 15:23
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.
Summary
Avoid adding empty
gradle/andgradle/jar-licenses/directories to JARs when copyingLICENSEandNOTICEintoMETA-INF.Problem
The existing copy configuration starts at the repository root. Gradle retains the source directories as empty JAR entries:
Fix
Copy the legal files directly from
gradle/jar-licensesintoMETA-INFfor shared Java JARs and the Spark 3.5 and 4.0 JARs. Spark bundle JAR handling is unchanged.Verification
META-INF/LICENSEandMETA-INF/NOTICE.gradle/andgradle/jar-licenses/are absent after the fix../gradlew spotlessCheckpasses.Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)