public class JavaLibraryClasspathProvider extends Object
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSet<JavaLibrary> |
getAllReachableJavaLibraries(Iterable<? extends BuildRule> rules)
Return the classpath, including traversing any provided_deps edges and non-java edges
|
static com.google.common.collect.ImmutableSet<JavaLibrary> |
getClasspathDeps(Iterable<BuildRule> deps)
Include the classpath entries from all JavaLibraryRules that have a direct line of lineage to
this rule through other JavaLibraryRules.
|
static com.google.common.collect.ImmutableSet<SourcePath> |
getClasspathsFromLibraries(Iterable<JavaLibrary> libraries)
Given libraries that may contribute classpaths, visit them and collect the classpaths.
|
static com.google.common.collect.ImmutableSet<SourcePath> |
getOutputClasspathJars(JavaLibrary javaLibraryRule,
Optional<SourcePath> outputJar) |
static com.google.common.collect.ImmutableSet<JavaLibrary> |
getTransitiveClasspathDeps(JavaLibrary javaLibrary) |
public static com.google.common.collect.ImmutableSet<SourcePath> getOutputClasspathJars(JavaLibrary javaLibraryRule, Optional<SourcePath> outputJar)
public static com.google.common.collect.ImmutableSet<JavaLibrary> getTransitiveClasspathDeps(JavaLibrary javaLibrary)
public static com.google.common.collect.ImmutableSet<JavaLibrary> getClasspathDeps(Iterable<BuildRule> deps)
A / \ B C / \ / \ D E F G
If all of the nodes correspond to BuildRules that implement JavaLibraryRule except for B (suppose B is a Genrule), then A's classpath will include C, F, and G, but not D and E. This is because D and E are used to generate B, but do not contribute .class files to things that depend on B. However, if C depended on E as well as F and G, then E would be included in A's classpath.
public static com.google.common.collect.ImmutableSet<SourcePath> getClasspathsFromLibraries(Iterable<JavaLibrary> libraries)
This is used to generate transitive classpaths from library discovered in a previous traversal.
public static com.google.common.collect.ImmutableSet<JavaLibrary> getAllReachableJavaLibraries(Iterable<? extends BuildRule> rules)