[Git][reproducible-builds/reproducible-website][master] Update the Grade snippet. Thanks @sdavids! (Closes: #63)
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Mon Apr 28 17:44:02 UTC 2025
Chris Lamb pushed to branch master at Reproducible Builds / reproducible-website
Commits:
670e07f8 by Chris Lamb at 2025-04-28T10:43:40-07:00
Update the Grade snippet. Thanks @sdavids! (Closes: #63)
- - - - -
1 changed file:
- _docs/source-date-epoch.md
Changes:
=====================================
_docs/source-date-epoch.md
=====================================
@@ -348,6 +348,25 @@ let build_date =
### Java / gradle
+With [Kotlin](https://kotlinlang.org/) (recommended):
+
+```kotlin
+tasks.withType<AbstractArchiveTask>().configureEach {
+ isPreserveFileTimestamps = false
+ isReproducibleFileOrder = true
+ dirPermissions {
+ unix("rwxr-xr-x")
+ }
+ filePermissions {
+ unix("rw-r--r--")
+ }
+}
+```
+
+The Gradle website also has information on [working with reproducible archives](https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives).
+
+Legacy [Groovy](https://groovy-lang.org/) implementation:
+
```groovy
def buildDate = System.getenv("SOURCE_DATE_EPOCH") == null ?
new java.util.Date() :
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/670e07f87c8d829066116380a02cada323ef77bc
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/670e07f87c8d829066116380a02cada323ef77bc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20250428/646f9d5e/attachment.htm>
More information about the rb-commits
mailing list