Skip to content

Do not print confusing 'Could not execute build' to console for a valid build failure #1834

@jjohannes

Description

@jjohannes

Is your feature request related to a problem? Please describe.

If I run a build via the Gradle command and it fails, l get an output like this:

> Task :compileJava FAILED

[Incubating] Problems report is available at: build/reports/problems/problems-report.html
11 actionable tasks: 1 executed, 10 up-to-date
Configuration cache entry stored.

When I run the build through the vscode-gradle extension, the output looks like this:

> Task :compileJava FAILED

[Incubating] Problems report is available at: build/reports/problems/problems-report.html
11 actionable tasks: 1 executed, 10 up-to-date
Configuration cache entry stored.
Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-9.5.0-bin.zip'.

The additional Could not execute build using connection to Gradle distribution is confusing. It sounds like something is wrong with the connection to Gradle. For many users, running a build that fails, still means that there was "no error connecting to Gradle".

Describe the solution you'd like

If the only problem that appears in a run is a valid build failure, do not print the Could not execute build using connection to Gradle distribution line to the console.

This is the same behavior as running Gradle directly on a terminal or via IntelliJ.

Describe alternatives you've considered

n/a

Additional context

I will provide a PR with one possible solution to demonstrate where this error is forwarded to the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-triagedduplicateThis issue or pull request already existsenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions