File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,24 @@ Building with Apache Ant
32
32
* Type ` ant doc ` to build the javadoc HTML documentation.
33
33
* Type ` ant -projecthelp ` to see all available targets.
34
34
35
+ ### Reproducible builds
36
+
37
+ Reproducible builds should be possible. A timestamp needs to be
38
+ specified which will be used for file modification times in the
39
+ JAR metadata. The timestamps are stored using the local timezone,
40
+ thus it's good to override it to GMT/UTC. On POSIX systems, the
41
+ following commands are equivalent:
42
+
43
+ $ ANT_OPTS=-Duser.timezone=GMT \
44
+ ant -Dant.tstamp.now.iso=2024-07-29T14:10:26Z
45
+
46
+ $ SOURCE_DATE_EPOCH=1722262226 TZ=UTC0 ant
47
+
48
+ When the Git repository is available, using the committer date
49
+ is one way to get a reasonable value:
50
+
51
+ $ SOURCE_DATE_EPOCH=$(git log -n1 --pretty=%ct) TZ=UTC0 ant
52
+
35
53
### Old build environments
36
54
37
55
* If you are using Ant older than 1.10.2:
You can’t perform that action at this time.
0 commit comments