dev.gradleplugins.runnerkit.providers.GradleTasksProvider 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 GradleTasksProvider extends AbstractGradleExecutionProvider> implements GradleExecutionCommandLineProvider {
public static GradleTasksProvider empty() {
return fixed(GradleTasksProvider.class, emptyList());
}
public static GradleTasksProvider of(List tasks) {
return fixed(GradleTasksProvider.class, unmodifiableList(tasks));
}
public GradleTasksProvider plus(Iterable tasks) {
val result = new ArrayList();
result.addAll(get());
tasks.forEach(result::add);
return fixed(GradleTasksProvider.class, unmodifiableList(result));
}
@Override
public List getAsArguments() {
return get();
}
}