I’m trying to optimize our builds on Jenkins. Gradle easily detects if it needs to compile and rebuild a module by comparing the output of a previous run. However consider on a build server where there are several developers each working in a separate branch. Now typically you start off with a clean slate and rebuild everything from scratch but what if you have:
and developer 1 is working on A, developer 2 is working on B. So both will be compiling C from scratch wasting time.
What I’d like: when either of them finishes, copy the generated .class files somewhere and then in a subsequent run, perhaps via the use of task.onlyIf somewhere I would: a) diff the current module source with a previous source b) If they are different, build as usual (optionally do this at a file-level) c) If they are identical, copy the previous binaries as would happen during compilation and skip the module
Am I going overboard ?