Search in sources :

Example 1 with BuildExceptionReporter

use of org.gradle.internal.buildevents.BuildExceptionReporter in project gradle by gradle.

the class CommandLineActionFactory method convert.

/**
     * <p>Converts the given command-line arguments to an {@link Action} which performs the action requested by the
     * command-line args.
     *
     * @param args The command-line arguments.
     * @return The action to execute.
     */
public Action<ExecutionListener> convert(List<String> args) {
    ServiceRegistry loggingServices = createLoggingServices();
    LoggingConfiguration loggingConfiguration = new DefaultLoggingConfiguration();
    return new WithLogging(loggingServices, args, loggingConfiguration, new ExceptionReportingAction(new JavaRuntimeValidationAction(new ParseAndBuildAction(loggingServices, args)), new BuildExceptionReporter(loggingServices.get(StyledTextOutputFactory.class), loggingConfiguration, clientMetaData())));
}
Also used : StyledTextOutputFactory(org.gradle.internal.logging.text.StyledTextOutputFactory) LoggingConfiguration(org.gradle.api.logging.configuration.LoggingConfiguration) DefaultLoggingConfiguration(org.gradle.internal.logging.DefaultLoggingConfiguration) DefaultLoggingConfiguration(org.gradle.internal.logging.DefaultLoggingConfiguration) ServiceRegistry(org.gradle.internal.service.ServiceRegistry) LoggingServiceRegistry(org.gradle.internal.logging.services.LoggingServiceRegistry) BuildExceptionReporter(org.gradle.internal.buildevents.BuildExceptionReporter)

Aggregations

LoggingConfiguration (org.gradle.api.logging.configuration.LoggingConfiguration)1 BuildExceptionReporter (org.gradle.internal.buildevents.BuildExceptionReporter)1 DefaultLoggingConfiguration (org.gradle.internal.logging.DefaultLoggingConfiguration)1 LoggingServiceRegistry (org.gradle.internal.logging.services.LoggingServiceRegistry)1 StyledTextOutputFactory (org.gradle.internal.logging.text.StyledTextOutputFactory)1 ServiceRegistry (org.gradle.internal.service.ServiceRegistry)1