Build timestamp in JAR and UP-TO-DATE

Continuing the discussion from Dynamic MANIFEST.MF attribute (new Date()) causes Gradle to build the jar every time, even though nothing else changed:

Continuing the discussion from Dynamic MANIFEST.MF attribute (new Date()) causes Gradle to build the jar every time, even though nothing else changed:

I’m facing the same problem right now. Is this somehow possible in the latest version of Gradle?

It’s still the case that there’s no support for surgically ignoring changes like this.

What people tend to do is make things more static during development. For example, in non release builds using a static date. Or, something less dynamic such as the last mod timestamp of the most recently changed file.

Any news on this? Because I still see the problem.

There is still no support for just ignoring the value if you set it at configuration time.

This isn’t really a problem though because you’ll often see the manifest attributes wrapped in doFirst { }. This delays setting them until execution time and they only impact the task after the task is otherwise outdated and running anyway.