Search in sources :

Example 1 with BndWrapper

use of org.jetbrains.osgi.jps.build.BndWrapper in project intellij-plugins by JetBrains.

the class BundleCompiler method bundlifyLibraries.

/**
   * Bundlifies all libraries that belong to the given module and that are not bundles.
   * The bundles are cached, so if the source library does not change, it will not be bundlified again.
   * Returns a string array containing paths of the bundlified libraries.
   */
@NotNull
public List<String> bundlifyLibraries(@NotNull Module module) throws OsgiBuildException {
    myIndicator.setText("Bundling non-OSGi libraries for module '" + module.getName() + "'");
    File outputDir = BndWrapper.getOutputDir(getModuleOutputDir(module));
    List<LibraryBundlificationRule> libRules = ApplicationSettings.getInstance().getLibraryBundlificationRules();
    List<String> paths = OrderEnumerator.orderEntries(module).withoutSdk().withoutModuleSourceEntries().withoutDepModules().productionOnly().runtimeOnly().recursively().exportedOnly().classes().getPathsList().getPathList();
    List<File> files = ContainerUtil.map(paths, path -> new File(path));
    return new BndWrapper(this).bundlifyLibraries(files, outputDir, libRules);
}
Also used : LibraryBundlificationRule(org.jetbrains.osgi.jps.model.LibraryBundlificationRule) BndWrapper(org.jetbrains.osgi.jps.build.BndWrapper) File(java.io.File) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

File (java.io.File)1 NotNull (org.jetbrains.annotations.NotNull)1 BndWrapper (org.jetbrains.osgi.jps.build.BndWrapper)1 LibraryBundlificationRule (org.jetbrains.osgi.jps.model.LibraryBundlificationRule)1