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

Introduce CleanProperties #622

Merged
merged 1 commit into from
Feb 24, 2023
Merged

Introduce CleanProperties #622

merged 1 commit into from
Feb 24, 2023

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Dec 10, 2020

PropertiesFileTransformer uses java.utils.Properties internally as a storage.

java.utils.Properties store0() contains bw.write("#" + new Date().toString()); that prepends current timestamp before any content (after comments).

This effectively breaks reproducible builds that use PropertiesFileTransformer because every new build has different timestamp in transformed files.

CleanProperties implementation is introduced in order to remove prepended timestamp when creating output stream.

@johnrengelman johnrengelman added this to the 6.2 milestone Feb 21, 2021
@simPod simPod requested a review from johnrengelman February 25, 2021 15:41
@johnrengelman johnrengelman modified the milestones: 7.0, 8.0 Apr 26, 2021
@simPod
Copy link
Contributor Author

simPod commented Nov 6, 2021

@johnrengelman can I do anything to move this forward?

@grongor
Copy link

grongor commented Nov 26, 2021

@johnrengelman please, can we do anything to move this forward? We are deploying several java applications in one pipeline, and it would be really nice if we could skip the ones that didn't change. And we can't do that now since the hash of the jar always changes...

@crafton
Copy link

crafton commented Sep 14, 2022

@johnrengelman will this change be moving forward?

PropertiesFileTransformer uses `java.utils.Properties` internally as a storage.

`java.utils.Properties` `store0()` contains `bw.write("#" + new Date().toString());` that prepends current timestamp before any content (after comments).

 This effectively breaks reproducible builds that use PropertiesFileTransformer because every new build has different timestamp in transformed files.

 CleanProperties implementation is introduced in order to remove prepended timestamp when creating output stream.
@simPod
Copy link
Contributor Author

simPod commented Feb 15, 2023

Yet another rebase in few years. Fresh master.

@johnrengelman johnrengelman merged commit 31562dd into GradleUp:master Feb 24, 2023
@simPod simPod deleted the clean-props branch March 6, 2023 18:55
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.

4 participants