record (boolean isIncrementalBuild, boolean includeDependentModules, boolean includeRuntimeDependencies, boolean includeTests, Collection<? extends Module> modules) { boolean isRebuild() { if (!isIncrementalBuild && !modules.isEmpty()) { final Module someModule = modules.iterator().next(); final Module[] projectModules = ModuleManager.getInstance(someModule.getProject()).getModules(); return projectModules.length == modules.size(); } return false; } }