Make release archives reproducible - #22
Open
GerwinVerkerk wants to merge 1 commit into
Open
Conversation
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.
Problem
The generated archives depend on filesystem directory order and preserve file timestamps.
cleanalso leaves the customtarget/andtarget-api/output directories behind. Identical source can therefore produce different checksums or retain stale artifacts.Solution
cleanremove both custom output directories.Keeping the current archives and comparing extracted contents was considered, but rejected because release integrity checks need a stable artifact checksum, not only equivalent unpacked files.
Verification
./gradlew --no-daemon clean build— passed on Java 25clean shadowJarbuilds produced identical hashes:709ca0263fb01beca356b87482e804e3c05bd1dd0caad1d990c8132beb06effac0fd6aad83cdcfaf183132b4e66bfb3b10bfacc3775f38e77424a0bc338a16a9git diff --check— passedImpact and risk
clean, as expected.Rollback
Revert the commit. Existing release artifacts are not modified.