private boolean isDirty(boolean requireOutputs) throws IOException {
    if (!myStateFile.exists()) {
      log("State file '" + myStateFile + "' is missing, building...");
      return true;
    }

    java.nio.file.Path stateFile = myStateFile.toPath();
    String actualContent = Files.readString(stateFile);
    String expectedContent = buildManifest(myInputs, true) + "\n" + buildManifest(myOutputs, requireOutputs);

    if (!expectedContent.equals(actualContent)) {
      log("Inputs are changed according to state file " + myStateFile + ", rebuilding...");
      log("expected:\n" + expectedContent + "\n\nactual:\n" + actualContent + "\n", Project.MSG_VERBOSE);
      return true;
    }

    return false;
  }
private boolean isDirty(boolean requireOutputs)