21 ms·
As others mentioned gradle has a build cache. It works different to make as it doesn't take the mime timestamp of the input/output but rather creates hashes. In
by larusso 6y ago
As others mentioned gradle has a build cache. It works different to make as it doesn't take the mime timestamp of the input/output but rather creates hashes. In the early versions these caches were project local only. Later the cache was system wide. Now you can setup a gradle cache-server so the whole team can use the same cache. But this all comes of course with some restrictions. Gradle needs full control over the inputs/outputs. If another tool makes a change to an output gradle will mark this as dirty and will rebuild it from scratch. Same when you update java, gradle or plugins since gradle can't be certain that a an update of the mentioned parts would result in a different output. On paper this all makes sense. But if you start to write custom tasks which depend on each other or work on lists of input files this becomes increasingly difficult. Luckily writing tests for custom tasks is easy if one finds the documentation and muse to set this up.