Add clickable links to files in console output upon failure by tresat · Pull Request #36903 · gradle/gradle
IDEs often fails to recognize file paths containing special characters (e.g., spaces, unicode, or symbols) as clickable links in build failure output. This makes navigating to the source of an error more cumbersome. This update enhances error reporting by: - Modifying the exception handling to explicitly store the absolute file path where an error occurs. - Introducing a mechanism to detect if a file path needs URI encoding to be clickable by IDEs. - Automatically appending a properly encoded `file:` URI with the line number to the console output when necessary. This ensures that all failure locations, even those in complex paths, provide a direct and clickable link in IDEs, significantly improving the developer experience.