void (@NotNull Project project, @NotNull ProjectTaskContext context, @NotNull MyNotificationCollector notificationCollector, @NotNull Map<Class<? extends ProjectTask>, List<ProjectTask>> tasksMap) { Collection<? extends ProjectTask> buildTasks = tasksMap.get(ModuleBuildTask.class); if (ContainerUtil.isEmpty(buildTasks)) { return; } ModulesBuildSettings buildSettings = assembleModulesBuildSettings(buildTasks); CompilerManager compilerManager = CompilerManager.getInstance(project); if (buildSettings.isRebuild()) { compilerManager.rebuild(new MyCompileStatusNotification(notificationCollector)); } else { CompileScope scope = createScope( compilerManager, context, buildSettings.modules, buildSettings.includeDependentModules, buildSettings.includeRuntimeDependencies, buildSettings.includeTests ); if (buildSettings.isIncrementalBuild) { compilerManager.make(scope, new MyCompileStatusNotification(notificationCollector)); } else { compilerManager.compile(scope, new MyCompileStatusNotification(notificationCollector)); } } }