void (@NotNull DataNode<? extends ModuleData> dataNode, @NotNull ExternalSourceSet sourceSet) { MultiMap<ExternalSystemSourceType, String> gradleOutputMap = dataNode.getUserData(GradleProjectResolver.GRADLE_OUTPUTS); if (gradleOutputMap == null) { gradleOutputMap = MultiMap.create(); dataNode.putUserData(GradleProjectResolver.GRADLE_OUTPUTS, gradleOutputMap); } final ModuleData moduleData = dataNode.getData(); moduleData.useExternalCompilerOutput(resolverCtx.isDelegatedBuild()); for (Map.Entry<? extends IExternalSystemSourceType, ? extends ExternalSourceDirectorySet> directorySetEntry : sourceSet.getSources().entrySet()) { ExternalSystemSourceType sourceType = ExternalSystemSourceType.from(directorySetEntry.getKey()); ExternalSourceDirectorySet sourceDirectorySet = directorySetEntry.getValue(); File ideOutputDir = getIdeOutputDir(sourceDirectorySet); File gradleOutputDir = getGradleOutputDir(sourceDirectorySet); File outputDir = resolverCtx.isDelegatedBuild() ? gradleOutputDir : ideOutputDir; moduleData.setCompileOutputPath(sourceType, ideOutputDir == null ? null : ideOutputDir.getPath()); moduleData.setExternalCompilerOutputPath(sourceType, gradleOutputDir == null ? null : gradleOutputDir.getPath()); moduleData.setInheritProjectCompileOutputPath(sourceDirectorySet.isCompilerOutputPathInherited()); if (outputDir != null) { outputDirs.add(outputDir.getPath()); for (File file : sourceDirectorySet.getGradleOutputDirs()) { String gradleOutputPath = ExternalSystemApiUtil.toCanonicalPath(file.getPath()); gradleOutputMap.putValue(sourceType, gradleOutputPath); if (!file.getPath().equals(outputDir.getPath())) { moduleOutputsMap.put(gradleOutputPath, Pair.create(moduleData.getId(), sourceType)); } } } } }