Skip to content

[GEODE-10630] The source distribution does not complete ./gradlew build - #8058

Open
JinwooHwang wants to merge 1 commit into
apache:developfrom
JinwooHwang:feature/GEODE-10630
Open

[GEODE-10630] The source distribution does not complete ./gradlew build#8058
JinwooHwang wants to merge 1 commit into
apache:developfrom
JinwooHwang:feature/GEODE-10630

Conversation

@JinwooHwang

Copy link
Copy Markdown
Contributor

Cause

The src distribution in geode-assembly/build.gradle picks up .buildinfo twice:

  1. from rootProject.tasks.writeBuildInfo, which places the generated file at the archive root.
  2. from (rootDir), which sweeps the whole tree.

In a git checkout there is no $rootDir/.buildinfo, so only the first source contributes and the build passes. An unpacked source distribution already carries .buildinfo at its root, so the second source picks it up as well and Gradle 7 fails on the duplicate entry. The existing build/out directory exclusion covers build/.buildinfo but not the root copy.

Fix

Exclude .buildinfo from the rootDir sweep, leaving the writeBuildInfo output as the single authoritative entry. Contents are unchanged, so the source distribution stays reproducible: rebuilding from an unpacked tarball emits the same .buildinfo it shipped with.

Testing

With a .buildinfo placed at the repo root to reproduce the source-distribution layout:

  • Before: srcDistTar fails with the duplicate-entry error above.
  • After: BUILD SUCCESSFUL, and the archive contains exactly one .buildinfo, holding the real SCM values rather than the root copy.

For all changes, please confirm:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
  • Has your PR been rebased against the latest commit within the target branch (typically develop)?
  • Is your initial contribution a single, squashed commit?
  • Does gradlew build run cleanly?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

@JinwooHwang
JinwooHwang requested review from marinov-code and sboorlagadda and removed request for sboorlagadda September 7, 2026 21:07
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