private @Nullable String getTargetBytecodeVersion(@NotNull IdeaProject ideaProject) {
    String targetBytecodeVersion = getExternalModules(ideaProject).stream()
      .map(it -> getTargetBytecodeVersion(it.first, it.second))
      .filter(it -> it != null)
      .min(Comparator.naturalOrder())
      .orElse(null);
    if (targetBytecodeVersion != null) return targetBytecodeVersion;
    IdeaJavaLanguageSettings javaLanguageSettings = ideaProject.getJavaLanguageSettings();
    return getTargetBytecodeVersion(javaLanguageSettings);
  }
private @Nullable String getTargetBytecodeVersion(@NotNull IdeaProject ideaProject)