Search in sources :

Example 1 with ProjectLocalComponentProvider

use of org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectLocalComponentProvider in project gradle by gradle.

the class IdeaPlugin method registerImlArtifacts.

private void registerImlArtifacts() {
    Set<Project> projectsWithIml = Sets.filter(project.getRootProject().getAllprojects(), new Predicate<Project>() {

        @Override
        public boolean apply(Project project) {
            return project.getPlugins().hasPlugin(IdeaPlugin.class);
        }
    });
    for (Project project : projectsWithIml) {
        ProjectLocalComponentProvider projectComponentProvider = ((ProjectInternal) project).getServices().get(ProjectLocalComponentProvider.class);
        ProjectComponentIdentifier projectId = newProjectId(project);
        projectComponentProvider.registerAdditionalArtifact(projectId, createImlArtifact(projectId, project));
    }
}
Also used : Project(org.gradle.api.Project) IdeaProject(org.gradle.plugins.ide.idea.model.IdeaProject) ProjectLocalComponentProvider(org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectLocalComponentProvider) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier)

Example 2 with ProjectLocalComponentProvider

use of org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectLocalComponentProvider in project gradle by gradle.

the class EclipsePlugin method registerEclipseArtifacts.

private static void registerEclipseArtifacts(Project project) {
    ProjectLocalComponentProvider projectComponentProvider = ((ProjectInternal) project).getServices().get(ProjectLocalComponentProvider.class);
    ProjectComponentIdentifier projectId = newProjectId(project);
    String projectName = project.getExtensions().getByType(EclipseModel.class).getProject().getName();
    projectComponentProvider.registerAdditionalArtifact(projectId, createArtifact("project", projectId, projectName, project));
    projectComponentProvider.registerAdditionalArtifact(projectId, createArtifact("classpath", projectId, projectName, project));
}
Also used : ProjectLocalComponentProvider(org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectLocalComponentProvider) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier)

Aggregations

ProjectComponentIdentifier (org.gradle.api.artifacts.component.ProjectComponentIdentifier)2 ProjectLocalComponentProvider (org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectLocalComponentProvider)2 Project (org.gradle.api.Project)1 IdeaProject (org.gradle.plugins.ide.idea.model.IdeaProject)1