Skip to content

Commit

Permalink
Make build reproducible
Browse files Browse the repository at this point in the history
Which means that you can run build multiple times for a given commit and it will always produce the same, binary identical artifacts.
  • Loading branch information
wendigo committed Apr 25, 2024
1 parent d8a2c67 commit 4e312b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Airbase 155
* Checkstyle updates:
- Require exactly one space between array type and array initializer.
* Extract all plugins and dependencies versions to properties
* Make build reproducible
* Plugin updates:
- spotbugs-maven-plugin 4.8.4.0 (from 4.8.3.1)
- git-commit-id-maven-plugin 8.0.2 (from 8.0.1)
Expand Down
10 changes: 6 additions & 4 deletions airbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<project.build.targetJdk>8</project.build.targetJdk>
<project.report.outputEncoding>UTF-8</project.report.outputEncoding>
<project.report.inputEncoding>UTF-8</project.report.inputEncoding>
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>

<!-- airlift build specific options are prefixed air.build. -->

Expand Down Expand Up @@ -891,6 +892,7 @@
<encoding>${project.build.sourceEncoding}</encoding>
<maxmemory>${air.build.jvmsize}</maxmemory>
<doclint>${air.javadoc.lint}</doclint>
<notimestamp>true</notimestamp>
<additionalOptions>${surefireEnablePreview}</additionalOptions>
</configuration>
<executions>
Expand Down Expand Up @@ -920,8 +922,8 @@
<addClasspath>false</addClasspath>
</manifest>
<manifestEntries>
<!-- This is actually the time when the build was done -->
<Build-Time>${git.build.time}</Build-Time>
<!-- This is actually the time when the commit was done -->
<Build-Time>${git.commit.time}</Build-Time>
<Git-Commit-Id>${git.commit.id}</Git-Commit-Id>
<Implementation-Version>${git.commit.id.describe}</Implementation-Version>
</manifestEntries>
Expand All @@ -945,11 +947,11 @@
<configuration>
<!-- Include only properties used above to speed up build (https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/462) -->
<includeOnlyProperties>
<includeOnlyProperty>\Qgit.build.time</includeOnlyProperty>
<includeOnlyProperty>\Qgit.commit.id</includeOnlyProperty>
<includeOnlyProperty>\Qgit.commit.id.describe</includeOnlyProperty>
<includeOnlyProperty>\Qgit.commit.time</includeOnlyProperty>
</includeOnlyProperties>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZZ</dateFormat>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssXXX</dateFormat>
<gitDescribe>
<tags>true</tags>
</gitDescribe>
Expand Down

0 comments on commit 4e312b0

Please sign in to comment.