Set<String> (@Nullable File outputPathsFile, @NotNull ProjectTaskContext context, @NotNull TasksExecutionSettingsBuilder executionSettingsBuilder) { Set<String> affectedRoots = null; if (outputPathsFile != null && context.isCollectionOfGeneratedFilesEnabled()) { try { String content = FileUtil.loadFile(outputPathsFile); affectedRoots = isEmpty(content) ? Collections.emptySet() : Arrays.stream(splitByLines(content, true)).collect(Collectors.toSet()); } catch (IOException e) { LOG.warn("Can not load temp file with collected Gradle tasks output paths", e); } } if (affectedRoots == null) { List<Module> affectedModules = executionSettingsBuilder.getAffectedModules(); affectedRoots = ContainerUtil.newHashSet(CompilerPaths.getOutputPaths(affectedModules.toArray(Module.EMPTY_ARRAY))); } return affectedRoots; }