dimas-b commented on code in PR #2432:
URL: https://github.com/apache/polaris/pull/2432#discussion_r2294251931


##########
build-logic/src/main/kotlin/polaris-java.gradle.kts:
##########
@@ -237,9 +238,20 @@ configurations.all {
     }
 }
 
-// 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
+if (plugins.hasPlugin("io.quarkus")) {

Review Comment:
   Would it be worth moving it to `polaris-server.gradle.kts`?.. or perhaps 
make a separate plugin dedicated to quarkus?



##########
build-logic/src/main/kotlin/polaris-java.gradle.kts:
##########
@@ -237,9 +238,20 @@ configurations.all {
     }
 }
 
-// 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
+if (plugins.hasPlugin("io.quarkus")) {
+  tasks.named("quarkusBuild") {
+    actions.addLast {
+      listOf(
+          "quarkus-app/quarkus-run.jar",

Review Comment:
   Does Quarkus not respect `isReproducibleFileOrder`, etc.?



##########
build-logic/src/main/kotlin/Utilities.kt:
##########
@@ -61,3 +66,41 @@ fun JavaForkOptions.addSparkJvmOptions() {
         "-Djdk.reflect.useDirectMethodHandle=false",
       )
 }
+
+/**
+ * Rewrites the given ZIP file.
+ *
+ * The timestamps of all entries are set to `1980-02-01 00:00`, zip entries 
appear in a
+ * deterministic order.
+ */
+fun makeZipReproducible(source: File) {
+  val t = FileTime.fromMillis(318211200_000) // 1980-02-01 00:00 GMT

Review Comment:
   Why not `0` :wink: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to