if (startParameter.isProfile()) {
listenerManager.addListener(new ProfileListener(requestMetaData.getBuildTimeClock().getStartTime()));
}
DefaultGradle gradle = new DefaultGradle(
tracker.getCurrentBuild(),
startParameter, serviceRegistry);
return new DefaultGradleLauncher(
gradle,
serviceRegistry.get(InitScriptHandler.class),
new SettingsHandler(
new EmbeddedScriptSettingsFinder(
new DefaultSettingsFinder(WrapUtil.<ISettingsFileSearchStrategy>toList(
new MasterDirSettingsFinderStrategy(),
new ParentDirSettingsFinderStrategy()))),
serviceRegistry.get(SettingsProcessor.class),
new BuildSourceBuilder(
this,
serviceRegistry.get(ClassLoaderFactory.class),
serviceRegistry.get(CacheRepository.class))),
new DefaultGradlePropertiesLoader(),
new BuildLoader(
serviceRegistry.get(IProjectFactory.class)
),
serviceRegistry.get(BuildConfigurer.class),
gradle.getBuildListenerBroadcaster(),
serviceRegistry.get(ExceptionAnalyser.class),
loggingManager);
}