Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
make inner classes static where possible

Signed-off-by: Steven Crockett <crockett.j.steven@gmail.com>

    • -1
    • +1
    ./console/StyledTextOutputBackedRenderer.java
  1. … 41 more files in changeset.
Add `BuildServiceParameters.None` marker type that is used to indicate that a build service does not take any parameters, to match the pattern used in other places.

Extract some validation logic from several places so it can be reused in the places where parameterized isolated objects, such as artifact transforms or build services, are registered.

  1. … 35 more files in changeset.
Add missing references to fail warning mode

    • -1
    • +1
    ./LoggingConfigurationBuildOptions.java
  1. … 2 more files in changeset.
Use ISO 8601 log format for logged daemon messages

    • -1
    • +3
    ./console/StyledTextOutputBackedRenderer.java
  1. … 4 more files in changeset.
Remove some deprecated logging methods

    • -24
    • +1
    ./progress/DefaultProgressLoggerFactory.java
  1. … 2 more files in changeset.
Remove outdated UsedByScanPluginˆ

Use native-platform to detect whether stdin is attached to a console, rather than `System.console()`, as this can detect more cases, such as when Gradle is running from mintty on Windows (e.g. the cygwin terminal).

This allows the `init` task to prompt the user interactively when run from mintty on Windows.

Also consolidate some of the "is x connected to a console?" logic into a single place.

  1. … 11 more files in changeset.
Add missing @Override to all modules

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +1
    ./console/StyledTextOutputBackedRenderer.java
    • -0
    • +1
    ./console/ThrottlingOutputEventListener.java
    • -0
    • +6
    ./progress/DefaultProgressLoggerFactory.java
    • -0
    • +1
    ./services/DefaultLoggingManagerFactory.java
    • -0
    • +1
    ./services/DefaultStyledTextOutputFactory.java
    • -0
    • +1
    ./services/LoggingBackedStyledTextOutput.java
  1. … 985 more files in changeset.
Get a better error message if we can't cast the Logger appropriately

    • -1
    • +2
    ./slf4j/DefaultContextAwareTaskLogger.java
Address review feedback

- more test coverage on using task logger after task has been executed

- minor code polishing

    • -3
    • +1
    ./slf4j/OutputEventListenerBackedLogger.java
  1. … 1 more file in changeset.
Convert net.jcip.annotations to javax.annotation.concurrent annotations

  1. … 67 more files in changeset.
Some cleanup on removing unrequired methods

    • -7
    • +0
    ./slf4j/OutputEventListenerBackedLogger.java
  1. … 1 more file in changeset.
Handle KotlinCompile task logger decoration

    • -481
    • +0
    ./slf4j/ContextAwareBuildLogger.java
    • -0
    • +24
    ./slf4j/ContextAwareTaskLogger.java
    • -0
    • +481
    ./slf4j/DefaultContextAwareTaskLogger.java
  1. … 4 more files in changeset.
Fix `--console rich` and `--console verbose` so that they always write rich content to stdout and stderr, regardless of whether they are attached to a console or not. Previously, only one of these would have rich content written to them and the other plain, depending on which of these were connected to a console.

Fix `--console auto` to use verbose task headers when stdout is not attached to a console but stderr is.

Add test coverage for `--console auto`.

    • -16
    • +37
    ./sink/ConsoleConfigureAction.java
    • -11
    • +3
    ./sink/ErrorOutputDispatchingListener.java
  1. … 23 more files in changeset.
Remove some duplication from the logic that sets up logging to the console.

Also simplify some of the console functional tests.

    • -47
    • +34
    ./sink/ConsoleConfigureAction.java
  1. … 25 more files in changeset.
Decorate task logger with build operation id so usage from external thread is linked to correct task

    • -0
    • +27
    ./slf4j/BuildOperationAwareLogger.java
    • -0
    • +481
    ./slf4j/ContextAwareBuildLogger.java
    • -3
    • +15
    ./slf4j/OutputEventListenerBackedLogger.java
  1. … 5 more files in changeset.
Limit work in progress labels to 80 characters when the width of the console is not known (e.g. when running under Mintty or from the tooling API), to make wrapping less likely. Wrapping of the labels currently doesn't work particularly well on some consoles.

Also generate less garbage on each 'update now' console event.

    • -10
    • +9
    ./console/DefaultRedrawableLabel.java
    • -8
    • +16
    ./console/DefaultWorkInProgressFormatter.java
  1. … 8 more files in changeset.
Change the console rendering to avoid redrawing the build status or each work in progress line when nothing has changed. Previously, each line would be redrawn on each 'update now' event regardless of change (which are fired 10 times per second). The changes result in a much better experience on slower terminals, such as the Windows console, as the cursor does not bounce around while nothing else is changing on the screen.

Also skip setting and resetting the text attributes when rendering an empty span, to avoid generating some pointless control characters.

    • -4
    • +0
    ./console/ThrottlingOutputEventListener.java
    • -2
    • +23
    ./events/StyledTextOutputEvent.java
Don't write console dynamic content, such as the build status or work in progress, to stderr. Previously, dynamic content was written to stderr when it was attached to the console but stdout was not, however this messes up the console output when stdout is piped through some other command and then to the console (eg via `grep`).

Color output is still written to stderr when it is attached to the console

    • -0
    • +43
    ./console/FlushConsoleListener.java
  1. … 1 more file in changeset.
Add more validation of inject annotations.

- Don't allow an inject annotation on any method of a type for which it is not relevant, e.g. `@Workspace` on a `Task` (was only applied to getters previously).

- Don't allow multiple inject annotations on the same getter (received a cryptic error message previously).

- Don't allow inject annotations on private methods, setter methods, static methods and getter methods that cannot be overridden (was applied only to `@Inject` previously).

- Don't allow inject annotations on methods of `ExtensionAware` (received a cryptic error message previously).

  1. … 7 more files in changeset.
Tweak the output produced by `TreeFormatter`.

  1. … 36 more files in changeset.
Move `TreeFormatter` out of core and decouple from `TreeVisitor` by introducing an interface to represent something that can receive diagnostic information.

    • -0
    • +25
    ./text/DiagnosticsVisitor.java
    • -0
    • +243
    ./text/TreeFormatter.java
  1. … 68 more files in changeset.
Make OutputEventTransformer slightly faster

The set of forwarded events will never contain a remapped event,

so we can avoid the remove() call when we already know the event

in question was remapped.

Remove unnecessary ThreadLocal access

    • -2
    • +4
    ./progress/DefaultProgressLoggerFactory.java
Change the tooling API provider to route logging to the client stdout and stderr streams in a similar way to the command-line client.

When not producing rich output the tooling API writes errors to the stderr stream (same as when the command-line client is not run from a console), and when producing rich output the errors are written to the stdout stream (same as when the command-line client is run from a console).

  1. … 11 more files in changeset.
Don't show artifact transformation headers (#7421)

The headers for artifact transforms should not show up in the build

log if there is no output from the transformations.

That makes the console log much cleaner, especially for the plain and

verbose console.

The logging for artifact transformations still shows up in build scan

logs or if the transformation produced some output.

    • -1
    • +1
    ./sink/GroupingProgressLogEventGenerator.java
  1. … 6 more files in changeset.
De-incubate remaining 2.x API

  1. … 15 more files in changeset.
Remove log message that cannot be actioned by user

  1. … 1 more file in changeset.
Verify tests running in modular Java can access SLF4j

  1. … 7 more files in changeset.
Allow testing with `java.system.class.path` and SLF4j

The core `Slf4jLoggingConfigurer` assumes that the Gradle implementation

of `org.slf4j.ILoggerFactory` is being used. This is not the case when

tests are run using a custom system classloader (by setting the

`java.system.class.loader` system property).

Previously, this would result in a `ClassCastException` when attempting

to configure the logger. This change makes `Slf4jLoggingConfigurer` lenient

in this case, opting not to configure the underlying logger rather than

fail.

Fixes #2657

  1. … 4 more files in changeset.