use of org.jetbrains.osgi.jps.model.JpsOsmorcModuleExtension in project intellij-plugins by JetBrains.
the class OsmorcBuildTarget method computeRootDescriptors.
@NotNull
@Override
public List<BuildRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
List<BuildRootDescriptor> rootDescriptors = ContainerUtil.newArrayList();
JpsOsmorcModuleExtension extension = JpsOsmorcExtensionService.getExtension(getModule());
if (extension != null) {
File file = extension.getBundleDescriptorFile();
if (file != null) {
rootDescriptors.add(new BuildRootDescriptorImpl(this, file, true));
}
}
JpsJavaExtensionService.dependencies(getModule()).recursively().productionOnly().processModules(module -> {
if (module == getModule() || JpsOsmorcExtensionService.getExtension(module) == null) {
File root = JpsJavaExtensionService.getInstance().getOutputDirectory(myModule, false);
if (root != null) {
rootDescriptors.add(new BuildRootDescriptorImpl(this, root, true));
}
}
});
return rootDescriptors;
}
Aggregations