[java] restores incremental compilation in modular projects

This commit is contained in:
Roman Shevchenko
2016-11-24 15:23:52 +01:00
parent 1105a1baaa
commit c23f2df0fd
@@ -189,13 +189,15 @@ public class JavaBuilder extends ModuleLevelBuilder {
}
});
if (JavaBuilderUtil.isCompileJavaIncrementally(context)) {
if (!filesToCompile.isEmpty() || dirtyFilesHolder.hasRemovedFiles()) {
// at the moment, there is no incremental compilation for module-info files, so they should be rebuilt on every change
JavaModuleIndex index = getJavaModuleIndex(context);
for (JpsModule module : chunk.getModules()) {
ContainerUtil.addIfNotNull(filesToCompile, index.getModuleInfoFile(module));
}
}
if (JavaBuilderUtil.isCompileJavaIncrementally(context)) {
ProjectBuilderLogger logger = context.getLoggingManager().getProjectBuilderLogger();
if (logger.isEnabled() && !filesToCompile.isEmpty()) {
logger.logCompiledFiles(filesToCompile, BUILDER_NAME, "Compiling files:");