All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.gradleplugins.runnerkit.providers.GradleTasksProvider Maven / Gradle / Ivy

There is a newer version: 0.0.148
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy