Is there any way to generate a checksum for a set of files in Gradle?

Suppose we have three files: x.jar, y.jar, and z.jar and want to create a single checksum file for all three. With the help of this checksum I want to be able to figure out if at least one of these files has been changed.

There’s nothing in Gradle to do this for you.

It’s pretty easy to generate checksums in Java/Groovy for byte streams though so it won’t be too tricky to write some code to do this.

This post might provide some inspiration.