Examples of ExternalDependency


Examples of org.gradle.api.artifacts.ExternalDependency

        assertTrue(moduleDependency.isTransitive());
    }

    @Test
    public void testStringNotationWithNoVersion() {
        ExternalDependency moduleDependency = createDependency(
                String.format("%s:%s", TEST_GROUP, TEST_NAME));
        checkGroup(moduleDependency);
        checkName(moduleDependency);
        assertThat(moduleDependency.getVersion(), nullValue());
        assertTrue(moduleDependency.isTransitive());
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertTrue(moduleDependency.isTransitive());
    }

    @Test
    public void testStringNotationWithNoVersionAndNoGroup() {
        ExternalDependency moduleDependency = createDependency(
                String.format(":%s", TEST_NAME));
        checkName(moduleDependency);
        assertThat(moduleDependency.getGroup(), nullValue());
        assertThat(moduleDependency.getVersion(), nullValue());
        assertTrue(moduleDependency.isTransitive());
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertTrue(moduleDependency.isTransitive());
    }

    @Test
    public void testStringNotationWithModuleAndClassifier() {
        ExternalDependency moduleDependency = createDependency(TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER);
        assertCorrectnesForModuleWithClassifier(moduleDependency);
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertCorrectnesForModuleWithClassifier(moduleDependency);
    }

    @Test
    public void testMapNotationWithModuleAndClassifier() {
        ExternalDependency moduleDependency = createDependency(
                GUtil.map("group", TEST_GROUP, "name", TEST_NAME, "version", TEST_VERSION, "classifier", TEST_CLASSIFIER));
        assertCorrectnesForModuleWithClassifier(moduleDependency);
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertEquals(TEST_CLASSIFIER, artifact.getClassifier());
    }

    @Test
    public void mapNotation() {
        ExternalDependency moduleDependency = createDependency(GUtil.map("group", TEST_GROUP, "name", TEST_NAME, "version", TEST_VERSION));
        checkCommonModuleProperties(moduleDependency);
        assertTrue(moduleDependency.isTransitive());
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertTrue(moduleDependency.isTransitive());
    }

    @Test
    public void mapNotationWithConfiguration() {
        ExternalDependency moduleDependency = createDependency(GUtil.map("group", TEST_GROUP, "name", TEST_NAME, "version", TEST_VERSION,
                "configuration", TEST_CONFIGURATION));
        checkCommonModuleProperties(moduleDependency);
        assertTrue(moduleDependency.isTransitive());
        assertThat(moduleDependency.getConfiguration(), equalTo(TEST_CONFIGURATION));
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        assertThat(moduleDependency.getConfiguration(), equalTo(TEST_CONFIGURATION));
    }

    @Test
    public void mapNotationWithProperty() {
        ExternalDependency moduleDependency = createDependency(
                GUtil.map("group", TEST_GROUP, "name", TEST_NAME, "version", TEST_VERSION, "transitive", false));
        checkCommonModuleProperties(moduleDependency);
        assertThat(moduleDependency.isTransitive(), equalTo(false));
    }
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

        );
    }

    @Test
    public void addExternalModuleDependenciesWithSameModuleRevisionIdAndSameClassifiersShouldBePartOfSameDependencyDescriptor() {
        ExternalDependency dependency1 = new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_DEP_CONF);
        ModuleFactoryHelper.addExplicitArtifactsIfDefined(dependency1, null, "jdk14");

        ExternalDependency dependency2 = new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_OTHER_DEP_CONF);
        ModuleFactoryHelper.addExplicitArtifactsIfDefined(dependency2, null, "jdk14");

        assertThataddDependenciesWithSameModuleRevisionIdAndDifferentConfsShouldBePartOfSameDependencyDescriptor(
                dependency1, dependency2, externalModuleDependencyDescriptorFactory
        );
View Full Code Here

Examples of org.gradle.api.artifacts.ExternalDependency

    }


    @Test
    public void addExternalModuleDependenciesWithSameModuleRevisionIdAndDifferentClassifiersShouldNotBePartOfSameDependencyDescriptor() {
        ExternalDependency dependency1 = new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_DEP_CONF);
        ModuleFactoryHelper.addExplicitArtifactsIfDefined(dependency1, null, "jdk14");

        ExternalDependency dependency2 = new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_OTHER_DEP_CONF);
        ModuleFactoryHelper.addExplicitArtifactsIfDefined(dependency2, null, "jdk15");

        assertThataddDependenciesWithSameModuleRevisionIdAndDifferentClassifiersShouldNotBePartOfSameDependencyDescriptor(
                dependency1, dependency2, externalModuleDependencyDescriptorFactory
        );
View Full Code Here

Examples of org.gradle.tooling.model.ExternalDependency

                    result.add(dependencyType, mainBuildDir);
                }
                result.addAll(dependencyType, subDependencies);
            }
            else if (dependency instanceof ExternalDependency) {
                ExternalDependency externalDep = (ExternalDependency)dependency;
                result.add(dependencyType, externalDep.getFile());
            }
            else {
                LOGGER.log(Level.WARNING, "Unknown dependency: {0}", dependency);
            }
        }
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.