Search in sources :

Example 1 with StateTransitionControllerFactory

use of org.gradle.internal.model.StateTransitionControllerFactory in project gradle by gradle.

the class DefaultProjectStateRegistry method addProject.

private ProjectState addProject(BuildState owner, DefaultBuildProjectRegistry projectRegistry, DefaultProjectDescriptor descriptor) {
    Path projectPath = descriptor.path();
    Path identityPath = owner.calculateIdentityPathForProject(projectPath);
    String name = descriptor.getName();
    ProjectComponentIdentifier projectIdentifier = new DefaultProjectComponentIdentifier(owner.getBuildIdentifier(), identityPath, projectPath, name);
    IProjectFactory projectFactory = owner.getMutableModel().getServices().get(IProjectFactory.class);
    StateTransitionControllerFactory stateTransitionControllerFactory = owner.getMutableModel().getServices().get(StateTransitionControllerFactory.class);
    ProjectStateImpl projectState = new ProjectStateImpl(owner, identityPath, projectPath, descriptor.getName(), projectIdentifier, descriptor, projectFactory, stateTransitionControllerFactory);
    projectsByPath.put(identityPath, projectState);
    projectsById.put(projectIdentifier, projectState);
    projectRegistry.add(projectPath, projectState);
    return projectState;
}
Also used : Path(org.gradle.util.Path) StateTransitionControllerFactory(org.gradle.internal.model.StateTransitionControllerFactory) DefaultProjectComponentIdentifier(org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier) DefaultProjectComponentIdentifier(org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier)

Aggregations

ProjectComponentIdentifier (org.gradle.api.artifacts.component.ProjectComponentIdentifier)1 DefaultProjectComponentIdentifier (org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier)1 StateTransitionControllerFactory (org.gradle.internal.model.StateTransitionControllerFactory)1 Path (org.gradle.util.Path)1