@Nullable
  private static File getExecutableFile(LinkExecutable linkExecutable) {
    File executableFile;
    RegularFileProperty binaryFile = null;
    if (GradleVersionUtil.isCurrentGradleAtLeast("4.7")) {
      binaryFile = linkExecutable.getLinkedFile();
    }
    else {
      try {
        Object linkedFile = linkExecutable.getClass().getMethod("getBinaryFile").invoke(linkExecutable);
        if (linkedFile instanceof RegularFileProperty) {
          binaryFile = (RegularFileProperty)linkedFile;
        }
      }
      catch (Exception e) {
        //noinspection CallToPrintStackTrace
        e.printStackTrace();
      }
    }
    executableFile = binaryFile != null ? binaryFile.getAsFile().getOrNull() : null;
    return executableFile;
  }
@Nullable
  private static File getExecutableFile(LinkExecutable linkExecutable)