void (JpsModule rootModel, boolean exported, String moduleName) { final JpsElementFactory elementFactory = JpsElementFactory.getInstance(); final JpsDependenciesList dependenciesList = rootModel.getDependenciesList(); final JpsModuleDependency dependency = dependenciesList.addModuleDependency(elementFactory.createModuleReference(moduleName)); final JpsJavaDependencyExtension extension = getService().getOrCreateDependencyExtension(dependency); extension.setExported(exported); }