}
ScriptUsageLocationReporter usageLocationReporter = new ScriptUsageLocationReporter();
listenerManager.addListener(usageLocationReporter);
DeprecationLogger.useLocationReporter(usageLocationReporter);
GradleInternal gradle = serviceRegistry.get(Instantiator.class).newInstance(DefaultGradle.class, tracker.getCurrentBuild(), startParameter, serviceRegistry.get(ServiceRegistryFactory.class));
return new DefaultGradleLauncher(
gradle,
serviceRegistry.get(InitScriptHandler.class),
new SettingsHandler(
new DefaultSettingsFinder(
new BuildLayoutFactory()),
serviceRegistry.get(SettingsProcessor.class),
new BuildSourceBuilder(
this,
cancellationToken,
serviceRegistry.get(ClassLoaderScopeRegistry.class).getCoreAndPluginsScope(),
serviceRegistry.get(CacheRepository.class))
),
serviceRegistry.get(BuildLoader.class),
serviceRegistry.get(BuildConfigurer.class),
gradle.getBuildListenerBroadcaster(),
serviceRegistry.get(ExceptionAnalyser.class),
loggingManager,
listenerManager.getBroadcaster(ModelConfigurationListener.class),
listenerManager.getBroadcaster(TasksCompletionListener.class),
gradle.getServices().get(BuildExecuter.class),
listenerManager.getBroadcaster(BuildCompletionListener.class),
serviceRegistry
);
}