Search in sources :

Example 1 with JsonConcatenateStep

use of com.facebook.buck.json.JsonConcatenateStep in project buck by facebook.

the class CxxInferComputeReport method getBuildSteps.

@Override
public ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext) {
    buildableContext.recordArtifact(reportOutput);
    ImmutableSortedSet<Path> reportsToMergeFromDeps = FluentIterable.from(analysisToReport.getTransitiveAnalyzeRules()).transform(CxxInferAnalyze::getSourcePathToOutput).transform(context.getSourcePathResolver()::getAbsolutePath).toSortedSet(Ordering.natural());
    ImmutableSortedSet<Path> reportsToMerge = ImmutableSortedSet.<Path>naturalOrder().addAll(reportsToMergeFromDeps).add(context.getSourcePathResolver().getAbsolutePath(analysisToReport.getSourcePathToOutput())).build();
    return ImmutableList.<Step>builder().add(new MkdirStep(projectFilesystem, outputDirectory)).add(new JsonConcatenateStep(projectFilesystem, reportsToMerge, reportOutput, "infer-merge-reports", "Merge Infer Reports")).build();
}
Also used : ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) Path(java.nio.file.Path) JsonConcatenateStep(com.facebook.buck.json.JsonConcatenateStep) MkdirStep(com.facebook.buck.step.fs.MkdirStep)

Aggregations

JsonConcatenateStep (com.facebook.buck.json.JsonConcatenateStep)1 ExplicitBuildTargetSourcePath (com.facebook.buck.rules.ExplicitBuildTargetSourcePath)1 SourcePath (com.facebook.buck.rules.SourcePath)1 MkdirStep (com.facebook.buck.step.fs.MkdirStep)1 Path (java.nio.file.Path)1