dev.gradleplugins.runnerkit.providers.CommandLineArgumentsProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-runner-kit-impl Show documentation
Show all versions of gradle-runner-kit-impl Show documentation
Gradle runner kit implementation.
package dev.gradleplugins.runnerkit.providers;
import lombok.val;
import java.util.ArrayList;
import java.util.List;
import static java.util.Collections.emptyList;
import static java.util.Collections.unmodifiableList;
public final class CommandLineArgumentsProvider extends AbstractGradleExecutionProvider> implements GradleExecutionCommandLineProvider {
public static CommandLineArgumentsProvider empty() {
return fixed(CommandLineArgumentsProvider.class, emptyList());
}
public static CommandLineArgumentsProvider of(List arguments) {
return fixed(CommandLineArgumentsProvider.class, unmodifiableList(arguments));
}
public CommandLineArgumentsProvider plus(String argument) {
val result = new ArrayList(get());
result.add(argument);
return fixed(CommandLineArgumentsProvider.class, unmodifiableList(result));
}
@Override
public List getAsArguments() {
return get();
}
}