Search in sources :

Example 1 with ArtifactTypeRegistry

use of org.gradle.api.internal.artifacts.type.ArtifactTypeRegistry in project gradle by gradle.

the class DependencyResolvingClasspath method resolve.

private ResolveResult resolve() {
    ResolveResult result = new ResolveResult();
    dependencyResolver.resolve(resolveContext, remoteRepositories, globalRules, Specs.<DependencyMetadata>satisfyAll(), result, result, attributesSchema, new ArtifactTypeRegistry() {

        @Override
        public ImmutableAttributes mapAttributesFor(File file) {
            return ImmutableAttributes.EMPTY;
        }

        @Override
        public ImmutableAttributes mapAttributesFor(VariantResolveMetadata variant) {
            return variant.getAttributes().asImmutable();
        }

        @Override
        public ArtifactTypeContainer create() {
            throw new UnsupportedOperationException();
        }
    });
    return result;
}
Also used : ImmutableAttributes(org.gradle.api.internal.attributes.ImmutableAttributes) ArtifactTypeRegistry(org.gradle.api.internal.artifacts.type.ArtifactTypeRegistry) ArtifactTypeContainer(org.gradle.api.artifacts.type.ArtifactTypeContainer) VariantResolveMetadata(org.gradle.internal.component.model.VariantResolveMetadata) File(java.io.File)

Aggregations

File (java.io.File)1 ArtifactTypeContainer (org.gradle.api.artifacts.type.ArtifactTypeContainer)1 ArtifactTypeRegistry (org.gradle.api.internal.artifacts.type.ArtifactTypeRegistry)1 ImmutableAttributes (org.gradle.api.internal.attributes.ImmutableAttributes)1 VariantResolveMetadata (org.gradle.internal.component.model.VariantResolveMetadata)1