void (Collection<? extends Module> modules, Collection<String> unloadedModules, List<? super TargetTypeBuildScope> scopes, boolean forceBuild) { if (!modules.isEmpty() || !unloadedModules.isEmpty()) { for (JavaModuleBuildTargetType type : JavaModuleBuildTargetType.ALL_TYPES) { TargetTypeBuildScope.Builder builder = TargetTypeBuildScope.newBuilder().setTypeId(type.getTypeId()).setForceBuild(forceBuild); for (Module module : modules) { builder.addTargetId(module.getName()); } for (String unloadedModule : unloadedModules) { builder.addTargetId(unloadedModule); } scopes.add(builder.build()); } } }