Allow specifying local resources in `SpawnBuilder`.
@@ -56,6 +56,7 @@ public final class SpawnBuilder {
private final NestedSetBuilder<ActionInput> tools = NestedSetBuilder.stableOrder();
private RunfilesSupplier runfilesSupplier = EmptyRunfilesSupplier.INSTANCE;
+ private ResourceSet resourceSet = ResourceSet.ZERO;
public SpawnBuilder(String... args) {
this.args = ImmutableList.copyOf(args);
@@ -74,7 +75,7 @@ public final class SpawnBuilder {
inputs.build(),
tools.build(),
ImmutableSet.copyOf(outputs),
- ResourceSet.ZERO);
+ resourceSet);
}
public SpawnBuilder withPlatform(PlatformInfo platform) {
@@ -161,4 +162,9 @@ public final class SpawnBuilder {
tools.add(tool);
return this;
}
+
+ public SpawnBuilder withLocalResources(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ return this;
+ }
}
