private static void addUnprocessedIdeaResourceDirs(
    @NotNull Map<String, DefaultExternalSourceSet> externalSourceSets, // mutable
    @NotNull GradleSourceSetResolutionContext sourceSetResolutionContext,
    @NotNull String sourceSetName
  ) {
    Collection<File> ideaResourceDirs = SourceSet.TEST_SOURCE_SET_NAME.equals(sourceSetName)
                                        ? sourceSetResolutionContext.ideaTestResourceDirs
                                        : sourceSetResolutionContext.ideaResourceDirs;
    ExternalSystemSourceType resourceType = SourceSet.TEST_SOURCE_SET_NAME.equals(sourceSetName)
                                            ? ExternalSystemSourceType.TEST_RESOURCE
                                            : ExternalSystemSourceType.RESOURCE;

    DefaultExternalSourceSet externalSourceSet = externalSourceSets.get(sourceSetName);
    if (externalSourceSet == null) return;
    ExternalSourceDirectorySet resourceDirectorySet = externalSourceSet.getSources().get(resourceType);
    if (resourceDirectorySet == null) return;

    resourceDirectorySet.getSrcDirs().addAll(ideaResourceDirs);
  }
private static void addUnprocessedIdeaResourceDirs(
    @NotNull Map<String, DefaultExternalSourceSet> externalSourceSets, // mutable
    @NotNull GradleSourceSetResolutionContext sourceSetResolutionContext,
    @NotNull String sourceSetName
  )