When rebuiling a Groovy class it often regenerates a large number of class files that represent closures inside the class, even though the closures did not change.
This comes from the naming scheme of closure classes.
This leads to the problem that these class files are needlessly uploaded to a server during development time and time again.
According to blackdrag a possible solution might be to hash compare the generated closure classes with the classes on the disk, and if an identical class is found, to use that instead of writing out a new class files.
An alternative might maybe be to not number the closure classes, but to use the the hash value as part of their name, so that unchanged classes automatically keep the same name.
This would make the names less readable, but more deterministic, but would require collision avoidance if two hashes do collide.