@Override
  public Module @NotNull [] getModuleDependencies(boolean includeTests) {
    OrderEntry[] entries = getOrderEntries();
    List<Module> result = null;

    for (OrderEntry entry : entries) {
      if (entry instanceof ModuleOrderEntry) {
        DependencyScope scope = ((ModuleOrderEntry)entry).getScope();
        if (includeTests || scope.isForProductionCompile() || scope.isForProductionRuntime()) {
          Module module = ((ModuleOrderEntry)entry).getModule();
          if (module != null) {
            if (result == null) {
              result = new SmartList<>();
            }
            result.add(module);
          }
        }
      }
    }

    return result == null ? Module.EMPTY_ARRAY : result.toArray(Module.EMPTY_ARRAY);
  }
@Override
  public Module @NotNull [] getModuleDependencies(boolean includeTests)