use of com.facebook.buck.io.ArchiveMemberPath in project buck by facebook.
the class AbstractDependencyFileEntry method fromSourcePath.
public static DependencyFileEntry fromSourcePath(SourcePath sourcePath, SourcePathResolver resolver) {
final DependencyFileEntry.Builder builder = DependencyFileEntry.builder();
if (sourcePath instanceof ArchiveMemberSourcePath) {
ArchiveMemberSourcePath archiveMemberSourcePath = (ArchiveMemberSourcePath) sourcePath;
ArchiveMemberPath relativeArchiveMemberPath = resolver.getRelativeArchiveMemberPath(archiveMemberSourcePath);
builder.setPathToFile(relativeArchiveMemberPath.getArchivePath());
builder.setPathWithinArchive(relativeArchiveMemberPath.getMemberPath());
} else {
builder.setPathToFile(resolver.getRelativePath(sourcePath));
}
return builder.build();
}
Aggregations