For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

setPreserveFileTimestamps

open fun setPreserveFileTimestamps(preserveFileTimestamps: Boolean)(source)

Specifies whether file timestamps should be preserved in the archive.

If false this ensures that archive entries have the same time for builds between different machines, Java versions and operating systems.

Gradle defaults to false if not set explictly starting Gradle 9.0.0

Since

3.4

Parameters

preserveFileTimestamps

true if file timestamps should be preserved for archive entries