RFR: 8264449: Enable reproducible builds with SOURCE_DATE_EPOCH [v8]

Kevin Rushforth kcr at openjdk.org
Sat Jan 14 00:13:19 UTC 2023


On Fri, 13 Jan 2023 23:10:24 GMT, John Neffenger <jgneff at openjdk.org> wrote:

>> build.gradle line 5573:
>> 
>>> 5571:                         args(srcLegalDir)
>>> 5572:                         if (sourceDateEpoch != null) {
>>> 5573:                             args("--date", buildTimestamp)
>> 
>> Since the minimum boot JDK for building JavaFX is still JDK 17 GA, you will need to qualify this with a check for `if (jdk19OrLater)`. See the following for a pattern to use to define that flag:
>> 
>> https://github.com/openjdk/jfx/blob/1e4c083b90281e91b1e9cbbc615401e89bb933b1/build.gradle#L699-L704
>> 
>> Btw, the comment in that block should read "based on whether we are _building_ on JDK 18 or later".
>
> Done. The `jmodTask` checks for JDK 19 or later. Let me know if you think we should add the `--date` argument also for versions of JDK 17 later than 17.0.4. My tests indicate that JDK 17.0.5, for example, has enough back-ported features to get reproducible builds of JavaFX in some limited circumstances. I figured it wasn't worth it, though, considering we'll need JDK 20 eventually, anyway.

I agree that it isn't worth it. The goal is to make it still buildable with JDK 17, and what you've done does that. Thanks.

-------------

PR: https://git.openjdk.org/jfx/pull/446


More information about the openjfx-dev mailing list