Examples of TaskDependency


Examples of org.gradle.api.tasks.TaskDependency

    @Test
    public void getAllArtifactFiles() {
        final Task otherConfTaskMock = context.mock(Task.class, "otherConfTask");
        final Task artifactTaskMock = context.mock(Task.class, "artifactTask");
        final Configuration otherConfiguration = context.mock(Configuration.class);
        final TaskDependency otherConfTaskDependencyMock = context.mock(TaskDependency.class, "otherConfTaskDep");
        final TaskDependency artifactTaskDependencyMock = context.mock(TaskDependency.class, "artifactTaskDep");
        final File artifactFile1 = new File("artifact1");
        final File artifactFile2 = new File("artifact2");
        final PublishArtifact artifact = context.mock(PublishArtifact.class, "artifact");
        final PublishArtifact otherArtifact = context.mock(PublishArtifact.class, "otherArtifact");
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

        final Task fileDepTaskDummy = context.mock(Task.class, "fileDepTask");
        final ProjectDependency projectDependencyStub = context.mock(ProjectDependency.class);
        final FileCollectionDependency fileCollectionDependencyStub = context.mock(FileCollectionDependency.class);

        context.checking(new Expectations() {{
            TaskDependency projectTaskDependencyDummy = context.mock(TaskDependency.class, "projectDep");
            TaskDependency fileTaskDependencyStub = context.mock(TaskDependency.class, "fileDep");

            allowing(projectDependencyStub).getBuildDependencies();
            will(returnValue(projectTaskDependencyDummy));

            allowing(projectTaskDependencyDummy).getDependencies(target);
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

    @Test
    public void buildDependenciesDelegatesToInheritedConfigurations() {
        final Task target = context.mock(Task.class, "target");
        final Task otherConfTaskMock = context.mock(Task.class, "otherConfTask");
        final TaskDependency otherConfTaskDependencyMock = context.mock(TaskDependency.class, "otherConfTaskDep");
        final Configuration otherConfiguration = context.mock(Configuration.class, "otherConf");

        context.checking(new Expectations() {{
            allowing(otherConfiguration).getBuildDependencies();
            will(returnValue(otherConfTaskDependencyMock));
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

            allowing(projectDependencyStub).getDependencyProject(); will(returnValue(projectStub));
            allowing(projectStub).getTasks(); will(returnValue(taskContainerStub));
            allowing(taskContainerStub).findByName(taskName); will(returnValue(taskStub));
        }});

        TaskDependency td = configuration.getTaskDependencyFromProjectDependency(true, taskName);
        Task unusedTask = context.mock(Task.class, "unused");

        assertThat((Set<Task>) td.getDependencies(unusedTask), equalTo(toSet(taskStub)));
    }
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

            allowing(dependentConfig).getAllDependencies(ProjectDependency.class); will(returnValue(projectDependencies));
            allowing(projectDependency).getDependencyProject(); will(returnValue(taskProject));
        }});

        TaskDependency td = configuration.getTaskDependencyFromProjectDependency(false, taskName);
        assertThat((Set<Task>) td.getDependencies(tdTask), equalTo(toSet(desiredTask)));
    }
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

            // return null to mock not finding the given configuration
            allowing(configurationContainer).findByName(configName); will(returnValue(null));
        }});

        TaskDependency td = configuration.getTaskDependencyFromProjectDependency(false, taskName);
        assertThat(td.getDependencies(tdTask), equalTo(Collections.EMPTY_SET));
    }
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

        assertThat(projectDependency.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(a, b, c)));
    }

    private void expectTargetConfigurationHasDependencies(final Task... tasks) {
        context.checking(new Expectations(){{
            TaskDependency dependencyStub = context.mock(TaskDependency.class, "dependencies");

            allowing(projectConfigurationStub).getBuildDependencies();
            will(returnValue(dependencyStub));

            allowing(dependencyStub).getDependencies(null);
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

                public void describeTo(Description description) {
                    description.appendText("compare to");
                }
            });
           
            TaskDependency dependency = context.mock(TaskDependency.class);
            allowing(task).getTaskDependencies();
            will(returnValue(dependency));

            allowing(dependency).getDependencies(task);
            will(returnValue(toSet(dependencies)));
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

        }});
    }

    private void expectTargetConfigurationHasArtifacts(final Task... tasks) {
        context.checking(new Expectations(){{
            TaskDependency dependencyStub = context.mock(TaskDependency.class, "artifacts");

            allowing(projectConfigurationStub).getBuildArtifacts();
            will(returnValue(dependencyStub));

            allowing(dependencyStub).getDependencies(null);
View Full Code Here

Examples of org.gradle.api.tasks.TaskDependency

        }});
    }

    private void expectTargetConfigurationHasNoDependencies() {
        context.checking(new Expectations(){{
            TaskDependency dependencyStub = context.mock(TaskDependency.class);

            allowing(projectConfigurationStub).getBuildDependencies();
            will(returnValue(dependencyStub));

            allowing(projectConfigurationStub).getBuildArtifacts();
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.