Class SymlinkTree

    • Field Detail

      • category

        protected final String category
      • root

        protected final Path root
      • type

        protected final String type
    • Method Detail

      • resolveDuplicateRelativePaths

        public static<SourcePath,​Path> resolveDuplicateRelativePaths​(<SourcePath> sourcePaths,
                                                                                                                    SourcePathResolverAdapter resolver)
        Because of cross-cell, multiple SourcePaths can resolve to the same relative path, despite having distinct absolute paths. This presents a challenge for rules that require gathering all of the inputs in one directory.
        sourcePaths - set of SourcePaths to process
        a map that assigns a unique relative path to each of the SourcePaths.
      • getBuildDeps

        public SortedSet<BuildRule> getBuildDeps()
        Specified by:
        getBuildDeps in interface BuildRule
        the set of rules that must be built before this rule. Normally, this matches the value of the deps argument for this build rule in the build file in which it was defined.

        However, there are special cases where other arguments pull in implicit dependencies (e.g., the keystore argument in android_binary). In these cases, the implicit dependencies are also included in the set returned by this method. The value of the original deps argument, as defined in the build file, must be accessed via a custom getter provided by the build rule.

      • shouldDeleteExistingSymlink

        protected boolean shouldDeleteExistingSymlink​(ProjectFilesystem filesystem,
                                                      Path path)
      • isCacheable

        public boolean isCacheable()
        Description copied from interface: BuildRule
        Whether this BuildRule can be cached.

        Uncached build rules are never written out to cache, never read from cache, and does not count in cache statistics. This rule is useful for artifacts which cannot be easily normalized.

        Uncached rules are not always rebuilt, however, as long as the existing on-disk representation is up to date. This means that these rules can take advantage of SupportsInputBasedRuleKey to prevent rebuilding.

        Specified by:
        isCacheable in interface BuildEngineAction
        Specified by:
        isCacheable in interface BuildRule
        isCacheable in class AbstractBuildRule
      • getRoot

        public Path getRoot()
      • getRootSourcePath

        public SourcePath getRootSourcePath()