public class BuildPaths extends Object
BuildTargets in a systematic
manner.| Modifier and Type | Method and Description |
|---|---|
static Path |
getAnnotationDir(ProjectFilesystem filesystem,
BuildTarget target)
Return a path to a file in the buck-out/annotation/ directory, formatted with the target short
name.
|
static ForwardRelativePath |
getBaseDir(ProjectFilesystem filesystem,
BuildTarget target)
Return a relative path to a file taking into account the
target's package path and
formatting with the short name. |
static Path |
getGenDir(ProjectFilesystem filesystem,
BuildTarget target)
Return a relative path to a file in the buck-out/gen/ directory, formatted with the target
short name.
|
static Path |
getScratchDir(ProjectFilesystem filesystem,
BuildTarget target)
Return a path to a file in the buck-out/bin/ directory, formatted with the target short name.
|
static Optional<Path> |
removeHashFrom(Path path,
BuildTarget target)
Removes the hash from the buck-out path.
|
public static Path getScratchDir(ProjectFilesystem filesystem, BuildTarget target)
target - The BuildTarget to scope this path to.Path under buck-out/bin, scoped to the base path of target.public static Path getAnnotationDir(ProjectFilesystem filesystem, BuildTarget target)
target - The BuildTarget to scope this path to.Path under buck-out/annotation, scoped to the base path of
target.public static Path getGenDir(ProjectFilesystem filesystem, BuildTarget target)
target - The BuildTarget to scope this path to.Path under buck-out/gen, scoped to the base path of target.public static ForwardRelativePath getBaseDir(ProjectFilesystem filesystem, BuildTarget target)
target's package path and
formatting with the short name.
This is a portion of the path returned by, e.g., getGenDir(ProjectFilesystem,
BuildTarget)
target - The BuildTarget to scope this path to.Path scoped to the base path to target.public static Optional<Path> removeHashFrom(Path path, BuildTarget target)
path - Hashed buck-out pathtarget - Build target that generated pathOptional.empty() if the hash was not
found.