Skip to content

Commit

Permalink
Enhance Rule #6 with gradlex reproducible-builds plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
raphiz authored Sep 24, 2024
1 parent 74b634a commit d9cce82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,17 @@ Checkout the [`application` plugin documentation](https://docs.gradle.org/curren
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.

```kotlin
// Important: This configuration is probably not complete for your project!
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
dirPermissions { unix("755") }
filePermissions { unix("644") }
}
```

Alternatively, you might use [the Reproducible Builds plugin](https://github.com/gradlex-org/reproducible-builds/) to achive the same.

### Rule #7: Making sure dependency resolution is reproducible

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

0 comments on commit d9cce82

Please sign in to comment.