Examples of TaskInternal


Examples of org.gradle.api.internal.TaskInternal

        return task;
    }

    @Test
    public void doesNothingToTaskWithNoTaskActionAnnotations() {
        TaskInternal task = expectTaskCreated(DefaultTask.class);

        assertThat(task.getActions(), isEmpty());
    }
View Full Code Here

Examples of org.gradle.api.internal.TaskInternal

        public void collectTasks(Collection<? super Task> tasks) {
            collect(project, tasks);
        }

        private void collect(Project project, Collection<? super Task> tasks) {
            TaskInternal task = (TaskInternal) project.getTasks().findByName(taskName);
            if (task != null) {
                tasks.add(task);
                if (task.getImpliesSubProjects()) {
                    return;
                }
            }
            for (Project subProject : project.getChildProjects().values()) {
                collect(subProject, tasks);
View Full Code Here

Examples of org.gradle.api.internal.TaskInternal

     * Finds tasks that will have exactly the given name, without necessarily creating or configuring the tasks. Returns null if no such match found.
     */
    @Nullable
    public TaskSelectionResult selectWithName(String name, Project project, boolean includeSubProjects) {
        if (!includeSubProjects) {
            TaskInternal task = (TaskInternal) project.getTasks().findByName(name);
            if (task != null) {
                return new FixedTaskSelectionResult(Collections.<Task>singleton(task));
            }
        } else {
            LinkedHashSet<Task> tasks = new LinkedHashSet<Task>();
View Full Code Here

Examples of org.gradle.api.internal.TaskInternal

            will(returnValue(toSet(dependsOn)));
        }});
    }
   
    private Task brokenTask(String name, final RuntimeException failure, final Task... dependsOn) {
        final TaskInternal task = context.mock(TaskInternal.class);
        final TaskStateInternal state = context.mock(TaskStateInternal.class);
        setExpectations(name, task, state);
        dependsOn(task, dependsOn);
        context.checking(new Expectations() {{
            atMost(1).of(task).executeWithoutThrowingTaskFailure();
View Full Code Here

Examples of org.gradle.api.internal.TaskInternal

        }});
        return task;
    }
   
    private Task task(final String name, final Task... dependsOn) {
        final TaskInternal task = context.mock(TaskInternal.class);
        final TaskStateInternal state = context.mock(TaskStateInternal.class);
        setExpectations(name, task, state);
        dependsOn(task, dependsOn);
        context.checking(new Expectations() {{
            atMost(1).of(task).executeWithoutThrowingTaskFailure();
View Full Code Here

Examples of org.gradle.api.internal.TaskInternal

        }});
        return task;
    }
   
    private TaskInternal createTask(final String name) {
        TaskInternal task = context.mock(TaskInternal.class);
        TaskStateInternal state = context.mock(TaskStateInternal.class);
        setExpectations(name, task, state);
        return task;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.