use of com.facebook.buck.jvm.java.CopyResourcesStep in project buck by facebook.
the class GwtModule method getBuildSteps.
@Override
public ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext) {
ImmutableList.Builder<Step> steps = ImmutableList.builder();
Path workingDirectory = outputFile.getParent();
steps.add(new MakeCleanDirectoryStep(getProjectFilesystem(), workingDirectory));
// A CopyResourcesStep is needed so that a file that is at java/com/example/resource.txt in the
// repository will be added as com/example/resource.txt in the resulting JAR (assuming that
// "/java/" is listed under src_roots in .buckconfig).
Path tempJarFolder = workingDirectory.resolve("tmp");
steps.add(new CopyResourcesStep(getProjectFilesystem(), context.getSourcePathResolver(), ruleFinder, getBuildTarget(), filesForGwtModule, tempJarFolder, context.getJavaPackageFinder()));
steps.add(new JarDirectoryStep(getProjectFilesystem(), outputFile, /* entriesToJar */
ImmutableSortedSet.of(tempJarFolder), /* mainClass */
null, /* manifestFile */
null));
buildableContext.recordArtifact(outputFile);
return steps.build();
}
Aggregations