I've got a Gradle task that compiles ~300 C++ file...
# community-support
a
I've got a Gradle task that compiles ~300 C++ files using a custom clang. Compiling C++ is slow, so I want to only compile the C++ files that have changed (I can use
clang <file> -MM
to discover the file's dependencies too.) I thought that using an incremental task input would be a good fit, but there's a problem: If compilation fails on the last file, and then I fix it and re-run the compile task, then Gradle won't realise that it should only recompile the last file.
@Incremental
doesn't 'remember' anything if the previous execution failed. Is there a way of incrementally compiling, even if the previous result failed?
v
Probably only if you maintain separate incrementally information.