use of org.gradle.api.internal.artifacts.dsl.dependencies.DependencyLockingProvider in project gradle by gradle.
the class ShortCircuitEmptyConfigurationResolver method emptyGraph.
private void emptyGraph(ConfigurationInternal configuration, ResolverResults results, boolean verifyLocking) {
if (verifyLocking && configuration.getResolutionStrategy().isDependencyLockingEnabled()) {
DependencyLockingProvider dependencyLockingProvider = configuration.getResolutionStrategy().getDependencyLockingProvider();
DependencyLockingState lockingState = dependencyLockingProvider.loadLockState(configuration.getName());
if (lockingState.mustValidateLockState() && !lockingState.getLockedDependencies().isEmpty()) {
// Invalid lock state, need to do a real resolution to gather locking failures
delegate.resolveGraph(configuration, results);
return;
}
dependencyLockingProvider.persistResolvedDependencies(configuration.getName(), Collections.emptySet(), Collections.emptySet());
}
Module module = configuration.getModule();
ModuleVersionIdentifier id = moduleIdentifierFactory.moduleWithVersion(module);
ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(module);
ResolutionResult emptyResult = DefaultResolutionResultBuilder.empty(id, componentIdentifier, configuration.getAttributes());
ResolvedLocalComponentsResult emptyProjectResult = new ResolvedLocalComponentsResultGraphVisitor(thisBuild);
results.graphResolved(emptyResult, emptyProjectResult, EmptyResults.INSTANCE);
}
Aggregations