Search in sources :

Example 1 with DefaultBuildableComponentIdResolveResult

use of org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult in project gradle by gradle.

the class SelectorState method resolve.

/**
 * Does the work of actually resolving a component selector to a component identifier.
 */
public ComponentIdResolveResult resolve() {
    if (idResolveResult != null) {
        return idResolveResult;
    }
    BuildableComponentIdResolveResult idResolveResult = new DefaultBuildableComponentIdResolveResult();
    if (dependencyState.failure != null) {
        idResolveResult.failed(dependencyState.failure);
    } else {
        resolver.resolve(dependencyMetadata, versionConstraint, idResolveResult);
    }
    if (idResolveResult.getFailure() != null) {
        failure = idResolveResult.getFailure();
        failureSelectionReason = getReasonForSelector();
    }
    this.idResolveResult = idResolveResult;
    return idResolveResult;
}
Also used : DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult) BuildableComponentIdResolveResult(org.gradle.internal.resolve.result.BuildableComponentIdResolveResult) DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult)

Example 2 with DefaultBuildableComponentIdResolveResult

use of org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult in project gradle by gradle.

the class ExternalResourceResolverDescriptorParseContext method getMetaDataArtifact.

@Override
public LocallyAvailableExternalResource getMetaDataArtifact(ModuleDependencyMetadata dependencyMetadata, VersionSelector acceptor, ArtifactType artifactType) {
    BuildableComponentIdResolveResult idResolveResult = new DefaultBuildableComponentIdResolveResult();
    mainResolvers.getComponentIdResolver().resolve(dependencyMetadata, acceptor, null, idResolveResult);
    return getMetaDataArtifact((ModuleComponentIdentifier) idResolveResult.getId(), artifactType);
}
Also used : DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult) BuildableComponentIdResolveResult(org.gradle.internal.resolve.result.BuildableComponentIdResolveResult) DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult)

Example 3 with DefaultBuildableComponentIdResolveResult

use of org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult in project gradle by gradle.

the class TestModuleSelectorState method doResolve.

private ComponentIdResolveResult doResolve(VersionSelector acceptor, VersionSelector rejector, ComponentIdResolveResult previousResult) {
    if (previousResult != null) {
        return previousResult;
    }
    BuildableComponentIdResolveResult result = new DefaultBuildableComponentIdResolveResult();
    resolver.resolve(null, acceptor, rejector, result);
    return result;
}
Also used : DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult) BuildableComponentIdResolveResult(org.gradle.internal.resolve.result.BuildableComponentIdResolveResult) DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult)

Example 4 with DefaultBuildableComponentIdResolveResult

use of org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult in project gradle by gradle.

the class ExternalResourceResolverDescriptorParseContext method getMetaDataArtifact.

@Override
public LocallyAvailableExternalResource getMetaDataArtifact(ModuleDependencyMetadata dependencyMetadata, ArtifactType artifactType) {
    BuildableComponentIdResolveResult idResolveResult = new DefaultBuildableComponentIdResolveResult();
    mainResolvers.getComponentIdResolver().resolve(dependencyMetadata, null, idResolveResult);
    return getMetaDataArtifact((ModuleComponentIdentifier) idResolveResult.getId(), artifactType);
}
Also used : DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult) BuildableComponentIdResolveResult(org.gradle.internal.resolve.result.BuildableComponentIdResolveResult) DefaultBuildableComponentIdResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult)

Aggregations

BuildableComponentIdResolveResult (org.gradle.internal.resolve.result.BuildableComponentIdResolveResult)4 DefaultBuildableComponentIdResolveResult (org.gradle.internal.resolve.result.DefaultBuildableComponentIdResolveResult)4