Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Actually stamp java_binary targets
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jan 30, 2018
1 parent 7e44e4b commit 42c4dc0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/com/facebook/buck/jvm/java/DefaultJavaLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ public ImmutableList<Step> getBuildStampingSteps(BuildContext buildContext, Buil
steps.addAll(
ManifestBuildStamping.getBuildStampingSteps(
buildContext, stamp, getProjectFilesystem(), getSourcePathToOutput()));

return steps.build();
}
}
5 changes: 3 additions & 2 deletions src/com/facebook/buck/jvm/java/JavaBinary.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ public ImmutableList<Step> getBuildSteps(
public ImmutableList<Step> getBuildStampingSteps(BuildContext buildContext, BuildStamp stamp) {
Builder<Step> steps = ImmutableList.builder();

ManifestBuildStamping.getBuildStampingSteps(
buildContext, stamp, getProjectFilesystem(), getSourcePathToOutput());
steps.addAll(
ManifestBuildStamping.getBuildStampingSteps(
buildContext, stamp, getProjectFilesystem(), getSourcePathToOutput()));

return steps.build();
}
Expand Down
5 changes: 5 additions & 0 deletions src/com/facebook/buck/jvm/java/ManifestBuildStamping.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ static ImmutableList<Step> getBuildStampingSteps(
BuildStamp stamp,
ProjectFilesystem filesystem,
SourcePath jarToModify) {

if (jarToModify == null) {
return ImmutableList.of();
}

final Path outputJar = buildContext.getSourcePathResolver().getRelativePath(jarToModify);

Builder<Step> steps = ImmutableList.builder();
Expand Down

0 comments on commit 42c4dc0

Please sign in to comment.