This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 3cf9c52 Apprunner: make archives reproducible (#62)
3cf9c52 is described below
commit 3cf9c52473cab4beb436a58f8f5c12529c1736ea
Author: Robert Stupp <[email protected]>
AuthorDate: Fri Nov 21 11:08:55 2025 +0100
Apprunner: make archives reproducible (#62)
---
.../src/main/kotlin/polaris-apprunner-java.gradle.kts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git
a/apprunner/apprunner-build-logic/src/main/kotlin/polaris-apprunner-java.gradle.kts
b/apprunner/apprunner-build-logic/src/main/kotlin/polaris-apprunner-java.gradle.kts
index 5fde956..81e0a8e 100644
---
a/apprunner/apprunner-build-logic/src/main/kotlin/polaris-apprunner-java.gradle.kts
+++
b/apprunner/apprunner-build-logic/src/main/kotlin/polaris-apprunner-java.gradle.kts
@@ -167,3 +167,21 @@ tasks.withType<Javadoc>().configureEach {
// don't spam log w/ "warning: no @param/@return"
opt.addStringOption("Xdoclint:-reference", "-quiet")
}
+
+// ensure jars conform to reproducible builds
+//
(https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives)
+tasks.withType<AbstractArchiveTask>().configureEach {
+ isPreserveFileTimestamps = false
+ isReproducibleFileOrder = true
+
+ dirPermissions { unix("755") }
+ filePermissions {
+ // do not force the "execute" bit in case the file _is_ executable
+ user.read = true
+ user.write = true
+ group.read = true
+ group.write = false
+ other.read = true
+ other.write = false
+ }
+}