If you cannot avoid the recomputation altogether when no setting changes, you still *must* avoid to rewrite the file when nothing changes. Otherwise, the creation of the jar will be invalidated, which in turn will invalidate entirely the compilations of dependent projects in the same build. If you must, read the file before reading it and compare the existing content with what you intend to write. If they match, don't write.