Search in sources :

Example 1 with RootConfigurationMetadata

use of org.gradle.internal.component.local.model.RootConfigurationMetadata in project gradle by gradle.

the class DependencyLockingArtifactVisitor method startArtifacts.

@Override
public void startArtifacts(RootGraphNode root) {
    RootConfigurationMetadata metadata = root.getMetadata();
    dependencyLockingState = metadata.getDependencyLockingState();
    if (dependencyLockingState.mustValidateLockState()) {
        Set<ModuleComponentIdentifier> lockedModules = dependencyLockingState.getLockedDependencies();
        modulesToBeLocked = Maps.newHashMapWithExpectedSize(lockedModules.size());
        for (ModuleComponentIdentifier lockedModule : lockedModules) {
            modulesToBeLocked.put(lockedModule.getModuleIdentifier(), lockedModule);
        }
        allResolvedModules = Sets.newHashSetWithExpectedSize(this.modulesToBeLocked.size());
        extraModules = Sets.newHashSet();
        forcedModules = Maps.newHashMap();
    } else {
        modulesToBeLocked = Collections.emptyMap();
        allResolvedModules = Sets.newHashSet();
    }
}
Also used : ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) RootConfigurationMetadata(org.gradle.internal.component.local.model.RootConfigurationMetadata)

Aggregations

ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 RootConfigurationMetadata (org.gradle.internal.component.local.model.RootConfigurationMetadata)1