@Override
public ExitCode build(final CompileContext context, final ModuleChunk chunk,
DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget> dirtyFilesHolder,
final OutputConsumer outputConsumer) throws ProjectBuildException, IOException {
JpsProject project = context.getProjectDescriptor().getProject();
JpsClojureCompilerSettingsExtension extension = JpsClojureExtensionService.getExtension(project);
if (myBeforeJava && (extension == null || !extension.isClojureBefore())) return ExitCode.NOTHING_DONE;
if (!myBeforeJava && extension != null && extension.isClojureBefore()) return ExitCode.NOTHING_DONE;
if (extension != null && !extension.isCompileClojure()) return ExitCode.NOTHING_DONE;
final LinkedHashSet<JpsModule> javaModules = new LinkedHashSet<JpsModule>();
for (JpsModule module : chunk.getModules()) {
if (module.getModuleType().equals(JpsJavaModuleType.INSTANCE)) {
javaModules.add(module);