Package org.gradle.api.artifacts

Examples of org.gradle.api.artifacts.ResolvedArtifact


            will(returnValue(toSet()));
            allowing(configuration).isTransitive();
            will(returnValue(true));
        }});

        final ResolvedArtifact resolvedArtifact = context.mock(ResolvedArtifact.class);

        context.checking(new Expectations() {{
            one(resolvedConfiguration).getResolvedArtifacts();
            will(returnValue(toSet(resolvedArtifact)));
        }});
View Full Code Here


        assertThat(resolvedDependency.getParents(), equalTo(Collections.<ResolvedDependency>emptySet()));
    }

    @Test
    public void getAllModuleArtifacts() {
        ResolvedArtifact moduleArtifact = createArtifact("moduleArtifact");
        ResolvedArtifact childModuleArtifact = createArtifact("childModuleArtifact");
        DefaultResolvedDependency resolvedDependency = new DefaultResolvedDependency(newId("someGroup", "someName", "someVersion"), "someConfiguration");
        resolvedDependency.addModuleArtifact(moduleArtifact);
        DefaultResolvedDependency childDependency = new DefaultResolvedDependency(newId("someGroup", "someChild", "someVersion"), "someChildConfiguration");
        childDependency.addModuleArtifact(childModuleArtifact);
        resolvedDependency.getChildren().add(childDependency);
View Full Code Here

    }

    public ResolvedArtifact newArtifact(ResolvedConfigurationIdentifier owner, ComponentResolveMetaData component, ComponentArtifactMetaData artifact, ArtifactResolver artifactResolver) {
        Factory<File> artifactSource = new LazyArtifactSource(artifact, component.getSource(), artifactResolver);
        long id = idGenerator.generateId();
        ResolvedArtifact newArtifact = new DefaultResolvedArtifact(new DefaultResolvedModuleVersion(owner.getId()), artifact.getName(), artifactSource, id);
        artifacts.put(id, newArtifact);
        return newArtifact;
    }
View Full Code Here

    public Set<ResolvedArtifact> getArtifacts() {
        return new LinkedHashSet<ResolvedArtifact>(artifacts.values());
    }

    public ResolvedArtifact getArtifact(long artifactId) {
        ResolvedArtifact a = artifacts.get(artifactId);
        assert a != null : "Unable to find artifact for id: " + artifactId;
        return a;
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.ResolvedArtifact

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.