Class Dependencies


  • public final class Dependencies
    extends java.lang.Object
    Support for Bazel jdeps dependency output.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DepsProto.Dependencies collectDeps​(java.util.Optional<java.lang.String> targetLabel, ClassPath bootclasspath, Binder.BindingResult bound, Lower.Lowered lowered)
      Creates a jdeps proto for the current compilation.
      static java.util.Collection<java.lang.String> reduceClasspath​(com.google.common.collect.ImmutableList<java.lang.String> transitiveClasspath, com.google.common.collect.ImmutableSet<java.lang.String> directJars, com.google.common.collect.ImmutableList<java.lang.String> depsArtifacts)
      Filters a transitive classpath to contain only the entries for direct dependencies, and the types needed to compile those direct deps as reported by jdeps.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • reduceClasspath

        public static java.util.Collection<java.lang.String> reduceClasspath​(com.google.common.collect.ImmutableList<java.lang.String> transitiveClasspath,
                                                                             com.google.common.collect.ImmutableSet<java.lang.String> directJars,
                                                                             com.google.common.collect.ImmutableList<java.lang.String> depsArtifacts)
        Filters a transitive classpath to contain only the entries for direct dependencies, and the types needed to compile those direct deps as reported by jdeps.

        If no direct dependency information is available the full transitive classpath is returned.