Skip to content

Commit d9cce82

Browse files
authored
Enhance Rule #6 with gradlex reproducible-builds plugin
1 parent 74b634a commit d9cce82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,17 @@ Checkout the [`application` plugin documentation](https://docs.gradle.org/curren
148148
Gradle has [a few switches to make builds more reproducible](https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives). These must be set to ensure proper reproducibility of the genereated `.jar` files.
149149

150150
```kotlin
151+
// Important: This configuration is probably not complete for your project!
151152
tasks.withType<AbstractArchiveTask>().configureEach {
152153
isPreserveFileTimestamps = false
153154
isReproducibleFileOrder = true
155+
dirPermissions { unix("755") }
156+
filePermissions { unix("644") }
154157
}
155158
```
156159

160+
Alternatively, you might use [the Reproducible Builds plugin](https://github.com/gradlex-org/reproducible-builds/) to achive the same.
161+
157162
### Rule #7: Making sure dependency resolution is reproducible
158163

159164
Gradle's dependency resolution _can_ be unstable in the following cases:

0 commit comments

Comments
 (0)