only set file timestamps and permissions for jar
* this does not touch the other artifacts like source distribution and thus avoids problems with files like gradlew not being executable
diff --git a/build.gradle.kts b/build.gradle.kts
index 34461d7..dd1bf0b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -38,13 +38,17 @@
}
tasks.withType<AbstractArchiveTask>().configureEach {
- isPreserveFileTimestamps = false
- isReproducibleFileOrder = true
- filePermissions {
- unix("rw-r--r--")
- }
- dirPermissions {
- unix("rwxr-xr-x")
+
+ if (name == "jar") {
+ // make contents of freemarker.jar reproducible
+ isPreserveFileTimestamps = false
+ isReproducibleFileOrder = true
+ filePermissions {
+ unix("rw-r--r--")
+ }
+ dirPermissions {
+ unix("rwxr-xr-x")
+ }
}
}