import org.gradle.tooling.provider.model.ToolingModelBuilderRegistry;
public class ToolingRegistrationAction implements ProjectConfigureAction {
public void execute(ProjectInternal project) {
ToolingModelBuilderRegistry modelBuilderRegistry = project.getServices().get(ToolingModelBuilderRegistry.class);
ProjectPublicationRegistry projectPublicationRegistry = project.getServices().get(ProjectPublicationRegistry.class);
ProjectTaskLister taskLister = project.getServices().get(ProjectTaskLister.class);
GradleProjectBuilder gradleProjectBuilder = new GradleProjectBuilder();
IdeaModelBuilder ideaModelBuilder = new IdeaModelBuilder(gradleProjectBuilder);
modelBuilderRegistry.register(new EclipseModelBuilder(gradleProjectBuilder));