Package org.gradle.api.internal.artifacts

Examples of org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction


        if (options.hasOption(PROJECT_DEPENDENCY_TASK_NAMES) && options.hasOption(NO_PROJECT_DEPENDENCY_REBUILD)) {
            throw new CommandLineArgumentException(String.format(
                    "Error: The -%s and -%s options cannot be used together.", PROJECT_DEPENDENCY_TASK_NAMES,
                    NO_PROJECT_DEPENDENCY_REBUILD));
        } else if (options.hasOption(NO_PROJECT_DEPENDENCY_REBUILD)) {
            startParameter.setProjectDependenciesBuildInstruction(new ProjectDependenciesBuildInstruction(null));
        } else if (options.hasOption(PROJECT_DEPENDENCY_TASK_NAMES)) {
            List<String> normalizedTaskNames = new ArrayList<String>();
            for (String taskName : options.option(PROJECT_DEPENDENCY_TASK_NAMES).getValues()) {
                normalizedTaskNames.add(taskName);
            }
            startParameter.setProjectDependenciesBuildInstruction(new ProjectDependenciesBuildInstruction(
                    normalizedTaskNames));
        }

        if (!options.getExtraArguments().isEmpty()) {
            startParameter.setTaskNames(options.getExtraArguments());
View Full Code Here


        checkConversion("-e", "someScript", "-csomeFile", "clean");
    }

    @Test
    public void withNoProjectDependencyRebuild() {
        expectedProjectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(null);
        checkConversion("-a");
    }
View Full Code Here

        checkConversion("-a");
    }

    @Test
    public void withProjectDependencyTaskNames() {
        expectedProjectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(WrapUtil.toList("task1",
                "task2"));
        checkConversion("-Atask1", "-A", "task2");
    }
View Full Code Here

    private ProjectDependency createProjectDependency(String dependencyConfiguration) {
        AbstractProject dependencyProject = HelperUtil.createRootProject();
        dependencyProject.setGroup("someGroup");
        dependencyProject.setVersion("someVersion");
        return new DefaultProjectDependency(dependencyProject, dependencyConfiguration, new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()));
    }
View Full Code Here

    }

    @Test
    public void doesNotDependOnAnythingWhenProjectRebuildIsDisabled() {
        DefaultProjectDependency dependency = new DefaultProjectDependency(dependencyProjectStub,
                new ProjectDependenciesBuildInstruction(null));
        assertThat(dependency.getBuildDependencies().getDependencies(null), isEmpty());
    }
View Full Code Here

        Task a = taskInTargetProject("a");
        Task b = taskInTargetProject("b");

        DefaultProjectDependency dependency = new DefaultProjectDependency(dependencyProjectStub,
                new ProjectDependenciesBuildInstruction(toList("a", "b")));
        assertThat(dependency.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(a, b)));
    }
View Full Code Here

                dependencyProjectStub, "conf2", instruction))));
        Project otherProject = context.mock(Project.class, "otherProject");
        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
                otherProject, instruction))));
        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
                dependencyProjectStub, new ProjectDependenciesBuildInstruction(null)))));
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction

Copyright © 2018 www.massapicom. 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.