Search in sources :

Example 1 with LaunchableGradleProjectTask

use of org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleProjectTask in project gradle by gradle.

the class GradleProjectBuilder method tasks.

private static List<LaunchableGradleTask> tasks(DefaultGradleProject owner, TaskContainerInternal tasks) {
    tasks.discoverTasks();
    SortedSet<String> taskNames = tasks.getNames();
    List<LaunchableGradleTask> out = new ArrayList<LaunchableGradleTask>(taskNames.size());
    for (String taskName : taskNames) {
        Task t = tasks.findByName(taskName);
        if (t != null) {
            out.add(buildFromTask(new LaunchableGradleProjectTask(), t).setProject(owner).setProjectIdentifier(owner.getProjectIdentifier()));
        }
    }
    return out;
}
Also used : LaunchableGradleTask(org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleTask) LaunchableGradleProjectTask(org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleProjectTask) Task(org.gradle.api.Task) ToolingModelBuilderSupport.buildFromTask(org.gradle.plugins.ide.internal.tooling.ToolingModelBuilderSupport.buildFromTask) LaunchableGradleTask(org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleTask) LaunchableGradleProjectTask(org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleProjectTask) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 Task (org.gradle.api.Task)1 ToolingModelBuilderSupport.buildFromTask (org.gradle.plugins.ide.internal.tooling.ToolingModelBuilderSupport.buildFromTask)1 LaunchableGradleProjectTask (org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleProjectTask)1 LaunchableGradleTask (org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleTask)1